From 44307bd7998e5f1fc81d63d74edaf4756ddf5a47 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 8 Apr 2025 22:23:35 +0300 Subject: 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`. --- doc/sciteco.7.template | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index d5fc4af..1fe1dba 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -518,6 +518,8 @@ Miscelleaneous .br (modifier \fIdisabled\fP) T};T{ +\# Strictly speaking, it only does that from the start state. +\# At the beginning of strings or Q-reg specs, it only erases until the start state. Rub out until the beginning of the last command, which is not a no-op (whitespace). \(lq@\(rq and \(lq:\(rq modifiers are considered part of the command and also rubbed out. T} -- cgit v1.2.3