diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-12-04 16:43:51 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-12-04 16:43:51 +0300 |
commit | 48308687979f26a3498e7af94eacc8fe34307a78 (patch) | |
tree | afc05823788bc2985f29e33c667e631be2554cad /src/core-commands.c | |
parent | 3a823fb43ba0abe52f3152d337675e9ed9a3f175 (diff) | |
download | sciteco-48308687979f26a3498e7af94eacc8fe34307a78.tar.gz |
the <Xq> command now supports the @ modifier for cutting into the register
* Can be freely combined with the colon-modifier as well.
:@Xq cut-appends to register q.
* This simply deletes the given buffer range after the copy or append operation
as if followed by another <K> command.
* This has indeed been a very annoying missing feature, as you often have to retype the
range for a K or D command.
At the same time, this cannot be reasonably solved with a macro since macros
do not accept Q-Register arguments -- so we would have to restrict ourselves to one or a few
selected registers.
I was also considering to solve this with a special stack operation that duplicates the
top values, so that Xq leaves arguments for K, but this couldn't work for cutting lines
and would also be longer to type.
* It's the first non-string command that accepts @.
Others may follow in the future.
We're approaching ITS TECO madness levels.
Diffstat (limited to 'src/core-commands.c')
-rw-r--r-- | src/core-commands.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core-commands.c b/src/core-commands.c index 752a8e8..4523923 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -1253,7 +1253,9 @@ teco_state_start_input(teco_machine_main_t *ctx, gunichar chr, GError **error) case '@': /* * @ modifier has syntactic significance, so set it even - * in PARSE_ONLY* modes + * in PARSE_ONLY* modes. + * Unfortunately, it means that it must be evaluated and cleared + * everywhere, even where it has no syntactic significance. */ if (ctx->parent.must_undo) teco_undo_guint(ctx->__flags); |