diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-04-20 00:24:48 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-04-20 00:27:45 +0200 |
| commit | 38130f053e84535e37630e1388b858c46c580f9f (patch) | |
| tree | bbaff1e26c4ba941b8e959a495732625b48a28f3 /src/stdio-commands.c | |
| parent | 488dd3d64418f81555c9a005445d6a3adcc5eb0a (diff) | |
do not execute `^A` in parse-only mode
This was especially dangerous since the introduction of
a message level parameter, which could still be popped from
the expression stack in parse-only mode or during lexing.
This effectively broke n^A interactively in GTK.
Diffstat (limited to 'src/stdio-commands.c')
| -rw-r--r-- | src/stdio-commands.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stdio-commands.c b/src/stdio-commands.c index 123d0ea..c2a1c16 100644 --- a/src/stdio-commands.c +++ b/src/stdio-commands.c @@ -257,6 +257,9 @@ teco_state_print_string_done(teco_machine_main_t *ctx, teco_string_t str, GError { teco_int_t type; + if (ctx->flags.mode > TECO_MODE_NORMAL) + return &teco_state_start; + if (!teco_expressions_pop_num_calc(&type, TECO_MSG_USER, error)) return NULL; if (type < TECO_MSG_USER || type > TECO_MSG_MAX) { |
