From bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 4 Oct 2026 21:42:10 +0200 Subject: automatically disable ^G modifier after successful auto-completions This will be important once we're doing LSP auto-completions. Until a completion is complete, we do NOT want to disable the modifier however since otherwise it can be disabled after a partial completion if there happened to be a rubbed out command line. Discarding a rubbed out command line consequently no longer disables the modifier as well. Any change of the modifier is now logged with an Info-level message. Some rudimentary test case has been added for rub-in via ^G. --- tests/testsuite.at | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/testsuite.at') diff --git a/tests/testsuite.at b/tests/testsuite.at index 4378ca0..fef01dc 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -40,6 +40,7 @@ m4_define([TE_CHECK_CMDLINE], [ m4_define([TE_ESCAPE], [m4_format([%c], 27)]) m4_define([TE_RUBOUT], [m4_format([%c], 8)]) m4_define([TE_RUBOUT_WORD], [m4_format([%c], 23)]) +m4_define([TE_MODIFIER], [m4_format([%c], 7)]) AT_BANNER([Language features]) @@ -490,6 +491,12 @@ TE_CHECK_CMDLINE([[@I/ @:foo ]]TE_RUBOUT_WORD[[/ Z-3"N(0/0)']], 0, ignore, stde AT_FAIL_IF([$GREP "^Error:" stderr]) AT_CLEANUP +AT_SETUP([Rub in with immediate editing commands]) +TE_CHECK_CMDLINE([[@I/foo/ ]]TE_RUBOUT_WORD[]TE_MODIFIER[]TE_RUBOUT_WORD[[{Z-9"N(0/0)'}]], 0, ignore, stderr) +#AT_FAIL_IF([! $GREP "^Info: Immediate editing modifier" stderr]) +AT_FAIL_IF([$GREP "^Error:" stderr]) +AT_CLEANUP + AT_SETUP([Disallowed interactive commands]) # Command-line termination while editing the replacement register would # be hard to recover from. -- cgit v1.2.3