aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-16 03:34:55 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-16 03:34:55 +0100
commit52a8d7ff2b7454865b486c0f972395b6ccffd31a (patch)
treec012c9d0ecd9a1c84db96758a9ef4a6ae6584d6b /src/cmdline.cpp
parent107536fe38773ebe408cee5e01add97989797370 (diff)
downloadsciteco-52a8d7ff2b7454865b486c0f972395b6ccffd31a.tar.gz
fixed function key macros and command reinsertion after ^[
* one would expect function key macros masked for the start state to work after ^[ ($), but since it has its own state now, this was broken since f08187e454f56954b41d95615ca2e370ba19667e. * Similarily command reinsertion would reinsert too much after $, since the parser wouldn't be in the "real" start state. * The "escape" state should be handled like the start state (where new commands can begin) from the perspective of the user -- the difference is not even documented, it's an implementation detail.
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r--src/cmdline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp
index 271e2be..8c5bc42 100644
--- a/src/cmdline.cpp
+++ b/src/cmdline.cpp
@@ -391,7 +391,7 @@ Cmdline::process_edit_cmd(gchar key)
/* reinsert command */
do
insert();
- while (States::current != &States::start && rubout_len);
+ while (!States::is_start() && rubout_len);
} else {
/* rubout command */
rubout_command();
@@ -565,7 +565,7 @@ Cmdline::fnmacro(const gchar *name)
goto default_action;
mask = reg->get_integer();
- if (States::current == &States::start) {
+ if (States::is_start()) {
if (mask & FNMACRO_MASK_START)
return;
} else if (States::is_string()) {