From 33732749d74adaf06f222236910c4126d08d3cc9 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 2 Mar 2015 02:59:01 +0100 Subject: fixed re-insertion of incomplete commands we are not guaranteed to reach the start parser state again if the command is not terminated on the rubbed out command line --- src/cmdline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmdline.cpp b/src/cmdline.cpp index 02b8b3d..cc6b2b8 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -282,10 +282,12 @@ Cmdline::process_edit_cmd(gchar key) interface.ssm(SCI_GETWORDCHARS, 0, (sptr_t)wchars); if (modifier_enabled) { + /* reinsert word chars */ while (States::is_string() && rubout_len && strchr(wchars, str[len])) insert(); + /* reinsert non-word chars */ while (States::is_string() && rubout_len && !strchr(wchars, str[len])) insert(); @@ -304,7 +306,7 @@ Cmdline::process_edit_cmd(gchar key) /* reinsert command */ do insert(); - while (States::current != &States::start); + while (States::current != &States::start && rubout_len); } else { /* rubout command */ do -- cgit v1.2.3