From 72aa02bd388cd30f7d9b6621060d09af6947c485 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 21 Dec 2016 21:21:42 -0500 Subject: [PATCH] fixed middle click bug on whitespace --- TODO.md | 1 - xedit.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.49.0