diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 18:37:19 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 18:40:02 +0100 |
commit | be760fcd24d882627488b691661a1cb09c3edcb1 (patch) | |
tree | 4fa6ed7d6da34935a214995dd2dc689fb6816efb | |
parent | 669bdf6ea9739a26d92e745b71945fea43968dea (diff) | |
download | sciteco-be760fcd24d882627488b691661a1cb09c3edcb1.tar.gz |
fixup: word-rubout may rub out nothing
-rw-r--r-- | src/cmdline.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |