aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r--src/cmdline.cpp7
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) {