aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-28 02:41:33 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-28 02:41:33 +0300
commit86fbf212de71a83e7bb4d83a4b33e54bed52dff9 (patch)
tree1afd4168fa4448ff369181fe1e8b3d69472a1d2a /src/cmdline.c
parentafc50684cdb38815573fdff0f4fff47cc4eb00a8 (diff)
downloadsciteco-86fbf212de71a83e7bb4d83a4b33e54bed52dff9.tar.gz
`ED&2` can be used to access the program termination flag now
* `0,2ED` is roughly equivalent to `-EX` * `ED&2` can be used to query whether EX has been run. This is useful if macros can run EX. * `2,0ED` could be used to cancel the effect of EX. * But the real motivation is for implementing a REPL script.
Diffstat (limited to 'src/cmdline.c')
-rw-r--r--src/cmdline.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index 8612312..605af73 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -63,12 +63,6 @@ int malloc_trim(size_t pad);
teco_cmdline_t teco_cmdline = {};
-/*
- * FIXME: Should this be here?
- * Should perhaps rather be in teco_machine_main_t or teco_cmdline_t.
- */
-gboolean teco_quit_requested = FALSE;
-
/** Last terminated command line */
static teco_string_t teco_last_cmdline = {NULL, 0};
@@ -285,7 +279,7 @@ teco_cmdline_keypress(const gchar *data, gsize len, GError **error)
teco_interface_popup_clear();
- if (teco_quit_requested) {
+ if (teco_ed & TECO_ED_EXIT) {
/* caught by user interface */
g_set_error_literal(error, TECO_ERROR, TECO_ERROR_QUIT, "");
return FALSE;