aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-29 15:11:34 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-29 15:11:34 +0300
commitbac1efa51bf889d494013925586e87ef08307529 (patch)
tree26b29f0b08d7fede5dee0afdd90abc704821f7a6 /src/parser.c
parent417ee008981c9aabc04fb574c63f3d90e232986c (diff)
downloadsciteco-bac1efa51bf889d494013925586e87ef08307529.tar.gz
fixed <EC> interruptions on Gtk+ (and probably on PDCurses/Win32)
* test case: ECwhile true; do true; done$ * Some platforms require polling via teco_interface_is_interrupted() for detecting interruptions, so we added an idle watcher to the Glib event loop in spawn.c. * On platforms that do not require polling key presses (like Unix/ncurses), the idle watcher won't do any harm.
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c
index 9841c93..910fc7f 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -100,7 +100,7 @@ teco_machine_main_step(teco_machine_main_t *ctx, const gchar *macro, gint stop_p
ctx->parent.current, ctx->mode);
#endif
- if (teco_interface_is_interrupted()) {
+ if (G_UNLIKELY(teco_interface_is_interrupted())) {
teco_error_interrupted_set(error);
goto error_attach;
}