matbme / JABS.nvim

Just Another Buffer Switcher for Neovim
GNU General Public License v3.0
280 stars 10 forks source link

calling :JABSOpen when JABS window is already opened breaks the plugin #46

Open 64-bitman opened 1 year ago

64-bitman commented 1 year ago

neovim version = v0.9.0

Hello, When I call :JABSOpen when the JABS window is already opened, it breaks the entire plugin (I have to restart nvim for it work again) and gives me this error:

E5108: Error executing lua /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:557: Invalid buffer id: 2                                                 
stack traceback:                                                                                                                                                
        [C]: in function 'nvim_buf_delete'                                                                                                                      
        /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:557: in function 'close'                                                                     
        /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:621: in function 'open'                                                                      
        [string ":lua"]:1: in main chunk       

from this issue #9 :JABSOpen should toggle but that doesn't work for me