]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed middle click bug on whitespace
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 22 Dec 2016 02:21:42 +0000 (21:21 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 22 Dec 2016 02:21:42 +0000 (21:21 -0500)
TODO.md
xedit.c

diff --git a/TODO.md b/TODO.md
index 0954f3ff7ba6d0d9f4c0688ddf0c9d1a0ecb2425..5fa84341a1c861fbe4bb1a64697589f6e69c284a 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -3,7 +3,6 @@
 Up Next:
 
 * Tag line count should account for wrapped lines
-* Middle click on nothing quits the editor
 * Indent/Unindent on first line of buffer causes infinite loop
 * block selection should handle brace-balancing
 * context sensitive selection of words, commands, line numbers, or filenames.
diff --git a/xedit.c b/xedit.c
index 0dde8b26b2775511a064a14930b3632730765d3f..f36d2fbfa1bb0ba68b0ed83b15e546dd516a91ef 100644 (file)
--- a/xedit.c
+++ b/xedit.c
@@ -721,6 +721,7 @@ static void cmd_exec(char* cmd) {
 static void exec(char* cmd) {
     /* skip leading space */
     for (; *cmd && isspace(*cmd); cmd++);
+    if (!*cmd) return;
     /* see if it matches a builtin tag */
     Tag* tag = tag_lookup(cmd);
     if (tag) {