diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-08 22:23:35 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-08 23:59:21 +0300 |
commit | 44307bd7998e5f1fc81d63d74edaf4756ddf5a47 (patch) | |
tree | 130c3afbb6e92f01dee5c0adbf58be2551d3db00 /tests/atlocal.in | |
parent | ed73342ba738a2f65bf916a10670bfeec137a562 (diff) | |
download | sciteco-44307bd7998e5f1fc81d63d74edaf4756ddf5a47.tar.gz |
improved rubbing out commands with modifiers
* This was actually broken if the command is preceded by `@` and `:` characters, which
are __not__ modifiers.
E.g. `Q:@I/foo^W` would have rubbed out the `:` register as well.
* Also, since it was all done in teco_state_process_edit_cmd(),
it would also rub out modifier characters from within string arguments,
E.g. `@I/::^EQ^W`
* Real commands now have their own ^W rubout implementation, while the generic
fallback just rubs out until the start state is re-established.
This fails to rub out modifiers as in `@I/^W`, though.
* Real command characters now use the common TECO_DEFINE_STATE_COMMAND().
* Added test cases for CTRL+W rub out.
A few control characters are now portably available to tests
via environment variables `$ESCAPE`, `$RUBOUT` and `$RUBOUT_WORD`.
Diffstat (limited to 'tests/atlocal.in')
-rw-r--r-- | tests/atlocal.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in index adaf928..8465f96 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -13,6 +13,15 @@ fi # For testing command-line editing: SCITECO_CMDLINE="$SCITECO --no-profile --fake-cmdline" +# Control characters for testing immediate editing commands with $SCITECO_CMDLINE. +# Often, we can use {...} for testing rubout, but sometimes this is not enough. +# Directly embedding escapes into strings is not portable. +# Theoretically, we could directly embed control codes, but for the time being +# I am trying to keep non-TECO sources clean of non-printable characters. +RUBOUT=`printf '\8'` +RUBOUT_WORD=`printf '\27'` +ESCAPE=`printf '\33'` + # Make sure that the standard library from the source package # is used. SCITECOPATH="@abs_top_srcdir@/lib" |