minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.06k stars 42 forks source link

Error in post-command hook when Corfu is used in LaTeX-buffer after a bracketed command #465

Closed nameiwillforget closed 3 weeks ago

nameiwillforget commented 3 weeks ago

When writing LaTeX-documents, I frequently encounter the following error:

Error in post-command-hook (corfu--auto-post-command): (scan-error "Unbalanced parentheses" 26949 25790)

After this, Corfu-mode has to be toggled off and on again for it to provide completions. I'm not sure whether this is the only way to trigger it, but it happens reliably if I type after a bracketed command, then delete the text. For instance, if I write

\test{test}

then press Space after the closing bracket, I get that error. I tested this on the newest version of Corfu that is in Melpa.