aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-01-19 11:51:56 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2013-01-19 11:51:56 +0100
commit72b948fb1eaba1fc06de7325cc095f0889ce4d7f (patch)
tree4f53e793ddda10ca4ddcff9355a5c51953a389e6 /src/parser.cpp
parenta54b49f5a8858ae6603d0db56019adc3ce0dff90 (diff)
downloadsciteco-72b948fb1eaba1fc06de7325cc095f0889ce4d7f.tar.gz
allow <CTRL/C> to be typed; aborts last typed char
* CTRL/C will be a command so it is important to be able to type it directly * aborting character processing is important because it allows aborting infinite loops * since the loop interruption currently relies on SIGINT handling, there is only limited support for XCurses and GTK - CTRL/C has to be typed in the terminal window. later support for input queue polling might be added
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 1843b1d..658dbe5 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -79,6 +79,9 @@ Execute::step(const gchar *macro) throw (State::Error)
States::current, mode);
#endif
+ if (interface.is_interrupted())
+ throw State::Error("Interrupted");
+
State::input(macro[macro_pc]);
macro_pc++;
}