plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

nvim_win [neovim nightly]

Open Tus1688 opened this issue 4 years ago • 1 comments

Neovim version: NVIM v0.7.0-dev+823-g207307d0f coming from https://github.com/simrat39/symbols-outline.nvim/issues/98 First of all, I am not sure where to file an issue, I thought it was "symbols outline" fault, but when I try to use telescope I got this error:

E5108: Error executing lua ...ser/.vim/plugged/plenary.nvim/lua/plenary/popup/init.lua:408: Vim(lua):E5108: Error executing lua ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:21: Expected Lua number  
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'nvim_win_is_valid'                                                                                                                                                                         
        ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:21: in function 'has_code_win'                                                                                                                   
        ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:218: in function 'close'                                                                                                                         
        [string ":lua"]:1: in main chunk                                                                                                                                                                             
        [C]: in function 'nvim_set_current_win'                                                                                                                                                                      
        ...ser/.vim/plugged/plenary.nvim/lua/plenary/popup/init.lua:408: in function 'create'                                                                                                                        
        ...er/.vim/plugged/telescope.nvim/lua/telescope/pickers.lua:308: in function '_create_window'                                                                                                                
        ...er/.vim/plugged/telescope.nvim/lua/telescope/pickers.lua:378: in function 'find'                                                                                                                          
        ...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:268: in function 'v'                                                                                                                             
        ...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:617: in function 'v'                                                                                                                             
        ...im/plugged/telescope.nvim/lua/telescope/builtin/init.lua:509: in function 'find_files'                                                                                                                    
        [string ":lua"]:1: in main chunk                                                                                                                                                                             
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'nvim_set_current_win'                                                                                                                                                                      
        ...ser/.vim/plugged/plenary.nvim/lua/plenary/popup/init.lua:408: in function 'create'                                                                                                                        
        ...er/.vim/plugged/telescope.nvim/lua/telescope/pickers.lua:308: in function '_create_window'                                                                                                                
        ...er/.vim/plugged/telescope.nvim/lua/telescope/pickers.lua:378: in function 'find'                                                                                                                          
        ...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:268: in function 'v'                                                                                                                             
        ...m/plugged/telescope.nvim/lua/telescope/builtin/files.lua:617: in function 'v'                                                                                                                             
        ...im/plugged/telescope.nvim/lua/telescope/builtin/init.lua:509: in function 'find_files'                                                                                                                    
        [string ":lua"]:1: in main chunk

Whereas opening file from https://github.com/kyazdani42/nvim-tree.lua plugin resulting in:

E5108: Error executing lua /home/user/.vim/plugged/nvim-tree.lua/lua/nvim-tree/lib.lua:370: Vim(lua):E5108: Error executing lua ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:21: Expected Lua number  
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'nvim_win_is_valid'                                                                                                                                                                         
        ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:21: in function 'has_code_win'                                                                                                                   
        ...ged/symbols-outline.nvim/lua/symbols-outline/preview.lua:218: in function 'close'                                                                                                                         
        [string ":lua"]:1: in main chunk                                                                                                                                                                             
        [C]: in function 'cmd'                                                                                                                                                                                       
        /home/user/.vim/plugged/nvim-tree.lua/lua/nvim-tree/lib.lua:370: in function 'open_file'                                                                                                                     
        /home/user/.vim/plugged/nvim-tree.lua/lua/nvim-tree.lua:180: in function 'on_keypress'                                                                                                                       
        [string ":lua"]:1: in main chunk                                                                                                                                                                             
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'cmd'                                                                                                                                                                                       
        /home/user/.vim/plugged/nvim-tree.lua/lua/nvim-tree/lib.lua:370: in function 'open_file'                                                                                                                     
        /home/user/.vim/plugged/nvim-tree.lua/lua/nvim-tree.lua:180: in function 'on_keypress'                                                                                                                       
        [string ":lua"]:1: in main chunk

I am not sure if there is an issue on core, nvim --clean work fine, and there is no issue on nvim v0.7.0-dev+812-g2f31e7b88. Thanks in advance :)

Tus1688 avatar Jan 05 '22 05:01 Tus1688

This definitely seems like an issue with the implementation in symbols-outline rather than in core/plenary/nvim-tree. As mentioned in comment of issue there, this is caused by a breaking change in neovim core that fixed unintended behaviour.

We had a similar issue in telescope here, and from first glance it seems like a similar fix of "check if nil before passing to api function" would work for symbols-outline.

Closing now.

l-kershaw avatar Jan 05 '22 23:01 l-kershaw