aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-27 22:47:27 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-27 22:47:27 +0100
commit8460f925248b99e94169bbfa9f2645de677f2e27 (patch)
treed891ae50b009c64797e84ed7299d7e2d2956dc66 /src/cmdline.cpp
parent0fbbc0d99625e00e5a0389e28fc8dcd4160aeac2 (diff)
downloadsciteco-8460f925248b99e94169bbfa9f2645de677f2e27.tar.gz
fixed rubout of the first command after command line termination ($$)
* The $$ would leave the current state pointing to the "escape" state which was manually fixed up in macro return handling but not in command line return (ie. termination) handling. Therefore the initial state at the start of the command line after $$ was the "escape" state. The rubout-last-command immediate editing command would consequently end up in an infinite loop trying to reach the start state. * This has been fixed by setting the state before throwing Return(). Some additional paranoia assertions have been added to prevent this bug in the future.
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r--src/cmdline.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp
index 10e4a6b..f48714d 100644
--- a/src/cmdline.cpp
+++ b/src/cmdline.cpp
@@ -239,6 +239,8 @@ Cmdline::keypress(gchar key)
* The return "arguments" are currently
* ignored.
*/
+ g_assert(States::current == &States::start);
+
interface.popup_clear();
if (quit_requested)