Closed boltlessengineer closed 3 months ago
xnoremap <C-c> <Esc>
remap should work.
You are genius. I'll try that for a while and see if problem disappears.
I think this behavior should be prevented by default though.
@boltlessengineer @kevinhwang91 for what it's worth, I already have c-c mapped too esc in insert mode and this happens randomly to me too. At the same time it also will make my entire gutter column filled with random vimscript jargon of like v:lua.StatusCol()
or something. I'd take a screenshot of it but it bothered me so much that it happened constantly that I removed nvim-ufo from my configuration
I removed the xnoremap <C-c> <esc>
after this issue get closed, but I’m facing similar issue on <C-c>
keypress on visual mode.
Error in decoration provider ufo.end:
Error executing lua: Keyboard interrupt
stack traceback:
[C]: in function 'error'
...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:141: in function <...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:138>
I removed the
xnoremap <C-c> <esc>
after this issue get closed, but I’m facing similar issue on<C-c>
keypress on visual mode.Error in decoration provider ufo.end: Error executing lua: Keyboard interrupt stack traceback: [C]: in function 'error' ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:141: in function <...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:138>
debug yourself.
Neovim version (nvim -v | head -n1)
NVIM v0.10.0-dev-2062+ga7550a20e
Operating system/version
Ubuntu 22.04
How to reproduce the issue
When I type CTRL-C on Visual mode, I sometimes see error message below. It doesn’t happen always and I can’t reproduce immediately with same visual selection, so it’s really hard to reproduce. But it happens often enough to notice as a bug. (I’m not sure it’s issue of nvim-ufo side or neovim itself)
I usually use CTRL-C to quit Visual mode and I encountered this issue several times.
Expected behavior
Ctrl-C should not interrupt any internal nvim-ufo code. Vim should go back to Normal mode instead of printing errors.
Actual behavior
Here are errors I’ve encountered when I press Ctrl-C in visual mode.
I’ve seen other error messages but they all have
Error executing lua: Keyboard interrupt
in common.Edit: add more error message