sidebar-nvim / sidebar.nvim

A generic and modular lua sidebar for Neovim
758 stars 32 forks source link

Error Message when selecting text objects. #76

Open behzade opened 2 years ago

behzade commented 2 years ago

Describe the bug When selecting vim text objects, for example vaw to select a word, if there is a pause between pressing a and w the following error message is shown.

Error executing vim.schedule lua callback: .../packer/start/sidebar.nvim/lua/sidebar-nvim/renderer.lua:162: E565: Not allowed to change text or change window

stack traceback:                                                                                                                                                                                                     
        [C]: in function 'nvim_buf_set_lines'                                                                                                                                                                        
        .../packer/start/sidebar.nvim/lua/sidebar-nvim/renderer.lua:162: in function 'draw'                                                                                                                          
        .../pack/packer/start/sidebar.nvim/lua/sidebar-nvim/lib.lua:25: in function '_redraw'                                                                                                                        
        .../pack/packer/start/sidebar.nvim/lua/sidebar-nvim/lib.lua:34: in function 'loop'                                                                                                                           
        .../pack/packer/start/sidebar.nvim/lua/sidebar-nvim/lib.lua:50: in function ''                                                                                                                               
        vim/_editor.lua: in function <vim/_editor.lua:0>     

To Reproduce Steps to reproduce the behavior:

  1. Start to select a text object
  2. Pause before the last key press

Expected behavior No error message being displayed

Environment (please complete the following information):

GustavoKatel commented 2 years ago

thanks for the details, appreciate. I will take a look