From be760fcd24d882627488b691661a1cb09c3edcb1 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 11 Feb 2013 18:37:19 +0100 Subject: fixup: word-rubout may rub out nothing --- src/cmdline.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cmdline.cpp b/src/cmdline.cpp index 2e43e40..a1f8e44 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -159,13 +159,12 @@ process_edit_cmd(gchar key) interface.ssm(SCI_GETWORDCHARS, 0, (sptr_t)wchars); /* rubout non-word chars */ - do + while (strings[0] && strlen(strings[0]) > 0 && + !strchr(wchars, cmdline[macro_pc-1])) undo.pop(macro_pc--); - while (States::is_string() && - !strchr(wchars, cmdline[macro_pc-1])); /* rubout word chars */ - while (States::is_string() && + while (strings[0] && strlen(strings[0]) > 0 && strchr(wchars, cmdline[macro_pc-1])) undo.pop(macro_pc--); } else if (cmdline_len) { -- cgit v1.2.3