diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-02 02:59:01 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-02 02:59:01 +0100 |
commit | 33732749d74adaf06f222236910c4126d08d3cc9 (patch) | |
tree | e70647fe4d6dbe5f770d3688a3a3ca098876124f /src | |
parent | 4e6de8bfab612865631c5286e069c1773dee8c28 (diff) | |
download | sciteco-33732749d74adaf06f222236910c4126d08d3cc9.tar.gz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/cmdline.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 |