diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-23 19:37:54 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-23 22:48:15 +0300 |
commit | 3fda29e44ee0c9ef2a0b81d91af568c7e1c35c1f (patch) | |
tree | 649f4aaffcab65d1ce91b5b1525e8e954bef4add /src/core-commands.h | |
parent | 41f28fe6085e20bae6673434ce7ae6131e584281 (diff) | |
download | sciteco-3fda29e44ee0c9ef2a0b81d91af568c7e1c35c1f.tar.gz |
<^C> is a plain "return" command now, while <^C^C> exits from the program
* This may break existing macros!
^C is now essentially a synonym for $$ and may not terminate the program
when called from a non-toplevel macro frame.
However it improves compatibility with TECO-11.
* In contrast to TECO-11, ^C^C (exit) can be typed completely in upcaret mode.
Otherwise it wouldn't have been possible to use the exit command in ASCII-only scripts.
* The implementation of ^C^C uses a lookahead state similar to ^[ (escape).
^C does not return immediately, but the following character determines whether it will
perform a return or exit.
It's one of the rare cases in SciTECO where this is possible and safe since
^C is also disallowed on the command-line to avoid undesired command-line terminations
after ^C interruptions.
(You can only use $$ to terminate the command-line interactively.)
Diffstat (limited to 'src/core-commands.h')
-rw-r--r-- | src/core-commands.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core-commands.h b/src/core-commands.h index 523ba28..73257f6 100644 --- a/src/core-commands.h +++ b/src/core-commands.h @@ -39,6 +39,8 @@ TECO_DECLARE_STATE(teco_state_condcommand); TECO_DECLARE_STATE(teco_state_control); TECO_DECLARE_STATE(teco_state_ascii); TECO_DECLARE_STATE(teco_state_escape); +TECO_DECLARE_STATE(teco_state_ctlc); +TECO_DECLARE_STATE(teco_state_ctlc_control); TECO_DECLARE_STATE(teco_state_ecommand); typedef struct { |