Fix regression spuriously expanding abbr with cursor outside token

Given "abbr foo something", the input sequence

    foo<space><ctrl-z><space>

would re-expand the abbreviation on the second space which is surprising
because the cursor is not at or inside the command token.  This looks to be
a regression from 00432df42 (Trigger abbreviations after inserting process
separators, 2024-04-13)

Happily, 69583f303 (Allow restricting abbreviations to specific commands
(#10452), 2024-04-24) made some changes that mean the bad commit seems no
longer necessary. Not sure why it works but I'll take it.
This commit is contained in:
Johannes Altmanninger
2024-05-03 08:30:27 +02:00
parent b5624f2e81
commit d4ecea56df
5 changed files with 16 additions and 20 deletions

View File

@@ -114,7 +114,6 @@ pub enum ReadlineCmd {
FuncAnd,
FuncOr,
ExpandAbbr,
ExpandAbbrBacktrack,
DeleteOrExit,
Exit,
CancelCommandline,