Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Message when selecting text objects. #76

Open
behzade opened this issue Jul 10, 2022 · 1 comment
Open

Error Message when selecting text objects. #76

behzade opened this issue Jul 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@behzade
Copy link

behzade commented Jul 10, 2022

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):

  • nvim version: v0.7.2
  • sidebar setup:
 use({
       "sidebar-nvim/sidebar.nvim",
       config = function()
           local sidebar = require("sidebar-nvim")
           local sidebar_lib = require("sidebar-nvim.lib")
           local opts = {
               open = true,
               sections = {
                   "files",
                   "git",
                   "containers"
               },
           }
           sidebar.setup(opts)
           vim.api.nvim_create_autocmd(
               "BufEnter",
               { pattern = "*", callback = sidebar_lib.update }
           )
       end,
   })
@behzade behzade added the bug Something isn't working label Jul 10, 2022
@GustavoKatel
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants