Let LaTeX command autofill close on spaces

Is your feature request related to a problem? Please describe.
LaTeX commands can’t contain spaces or curly brackets, but when I type a latex command and then type one of these characters the autofill prompt doesn’t close, it stays open (it only closes after 5 characters of no-command-matches). This means it’s quite annoying to do something like pressing enter after typing a command as the prompt blocks that.

Describe the solution you’d like
I’d like it if the prompt closed automatically when you typed a space or a { character, as these aren’t in command names but are a way to end commands.

Describe alternatives you’ve considered
I’ve considered pressing enter to insert the command directly, but this is a bit awkward to use in some cases (see LaTeX command autofill inserts the wrong command - #2 by Kirill_Lem, LaTeX jumps back to the start if you type a command correctly, Double backslash command missing from LaTeX autocomplete)

I’ve considered an additional feature where if the ‘no options available’ text is there and enter is pressed the prompt closes without inserting anything (similarly to pressing escape). I still think this additional feature is a good idea and will likely submit a feature request for it soon.

Additional context
20220116_07h51m07s_grim
(Despite the command being finished here, the ‘no options available’ prompt still shows)

1 Like