vim-matchup icon indicating copy to clipboard operation
vim-matchup copied to clipboard

Crash when shell case is incomplete

Open cacharle opened this issue 2 years ago • 0 comments

Explain the issue

When I write a case statement in shell scripting, I get the following error if it doesn't end with esac.

Error detected while processing CursorMoved Autocommands for "*"..function 3[3]..4[153]..<SNR>28_do_offscreen[21]..<SNR>28_do_offscreen_
popup_nvim[67]..<SNR>28_populate_floating_win:
line   54:
E5555: API call: Cursor position outside buffer
Press ENTER or type command to continue

Minimal working example

case "$1" in
    foo)
        ;;

And just move the cursor in that code

Configuration I use

return require("packer").startup(function()
    use {
        'andymass/vim-matchup',
        setup = function()
            vim.g.matchup_matchparen_offscreen = { method = "popup" }
        end
    }
    use {
        "nvim-treesitter/nvim-treesitter",
        run = ":TSUpdate",
        config = function()
            require("nvim-treesitter.configs").setup {
                ensure_installed = {
                    "bash",
                    "c",
                    "commonlisp",
                    "cpp",
                    "fish",
                    "glsl",
                    "go",
                    "haskell",
                    "json",
                    "lua",
                    "markdown",
                    "meson",
                    "python",
                    "query",
                    "rust",
                    "vim",
                    "vimdoc",
                    "yaml",
                },
                highlight = {
                    enable = true
                },
                matchup = {
                    enable = true,              -- mandatory, false will disable the whole extension
                },
            }
            vim.cmd [[ highlight link pythonTSKeywordOperator Keyword ]]
        end
    }
end)

Versions

  • Neovim 0.9.1

I'm not sure how to get the version number of the plugins but I just updated them to the latest versions and I still get the error.

cacharle avatar Oct 05 '23 07:10 cacharle