From: Michael D. Lowis Date: Thu, 22 Dec 2016 02:21:42 +0000 (-0500) Subject: fixed middle click bug on whitespace X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=72aa02bd388cd30f7d9b6621060d09af6947c485;p=projs%2Ftide.git fixed middle click bug on whitespace --- diff --git a/TODO.md b/TODO.md index 0954f3f..5fa8434 100644 --- 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 0dde8b2..f36d2fb 100644 --- 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) {