Skip to content

Ctrl-C in visual mode terminates some lua execution #202

@boltlessengineer

Description

@boltlessengineer

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.

Error in decoration provider ufo.end:
Error executing lua: Keyboard interrupt
stack traceback:
        [C]: in function 'foldClosed'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:188: in function 'computeFoldedPairs'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:77: in function 'winCall'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:76: in function <...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:66>
Error in decoration provider ufo.end:
Error executing lua: Keyboard interrupt
stack traceback:
        [C]: in function 'foldClosed'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:181: in function 'computeFoldedPairs'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:77: in function 'winCall'
        ...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:76: in function <...tu/.local/share/nvim/lazy/nvim-ufo/lua/ufo/decorator.lua:66>

I’ve seen other error messages but they all have Error executing lua: Keyboard interrupt in common.

Edit: add more error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions