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

Freezes since the latest update

Open kantord opened this issue 4 years ago • 9 comments

Since the latest update, the plugin freezes on the second search.

On the first search, everything works fine but if I do a second search without exiting vim, it freezes forever.

I'm on NVIM v0.4.4

kantord avatar Jan 27 '21 16:01 kantord

Thanks for the report.

Could you try with the minimal vimrc please?

  1. Insert the following code into /tmp/vimrc:
if !filereadable('/tmp/vim/autoload/plug.vim')
  exe 'silent !mkdir -p /tmp/vim/autoload && curl -fLo /tmp/vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
set runtimepath+=/tmp/vim
call plug#begin('/tmp/vim/bundle')
Plug 'eugen0329/vim-esearch'
call plug#end()
PlugInstall | q
filetype plugin indent on
  1. Run nvim as nvim -u /tmp/vimrc

My steps are:

  1. Press \\fa<enter>
  2. Press \\fb<enter> and enter the pattern again.

My result is no freezes encountered (yet).

UPD Also provide your os name and any hints about the size of expected results please. If you have matches in minified js or svg files, it can result in some freezes, as vim itself tends to be slow when rendering huge files, but they still should be relatively small, not permanent.

eugen0329 avatar Jan 27 '21 17:01 eugen0329

2021-01-27T18:26:10+01:00

kantord avatar Jan 27 '21 17:01 kantord

Could you run this command in the console mkdir -p /tmp/vim/autoload && curl -fLo /tmp/vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim please?

eugen0329 avatar Jan 27 '21 17:01 eugen0329

Using this vimrc, it doesn't freeze

kantord avatar Jan 27 '21 18:01 kantord

That's strange, as the last two commits affect only <c-c> click in the prompt and existing swap messages when writing.

Probably, the issue is with a vim plugin you use. You can try to binary search it by disabling plugins listed in :au WinEnter,WinLeave,BufWinEnter,BufWinLeave or I'll try you vimrc tomorrow.

eugen0329 avatar Jan 27 '21 19:01 eugen0329

It is because of this plugin: https://github.com/TaDaa/vimade

kantord avatar Jan 27 '21 19:01 kantord

Can't reproduce with:

if !filereadable('/tmp/vim/autoload/plug.vim')
  exe 'silent !mkdir -p /tmp/vim/autoload && curl -fLo /tmp/vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
set runtimepath+=/tmp/vim
call plug#begin('/tmp/vim/bundle')
Plug 'eugen0329/vim-esearch'
Plug 'TaDaa/vimade'
call plug#end()
PlugInstall | q
filetype plugin indent on

Also tried your config with these two plugins injected.

More ideas to reproduce:

  1. Try to inspect htop output to see whether any remote plugins or lsp providers are stuck. I encounter the similar deadlock when I write a regular file or switch a tab, so this is probably a neovim bug.
  2. Try to reproduce the bug on a different machine with a different os using your latest configs. You can use this Vagrantfile example to access it faster.
Vagrant.configure('2') do |config|
  config.vm.box = 'ubuntu/focal64'

  config.vm.provision 'shell', inline: '
    curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
    chmod u+x nvim.appimage
    mv nvim.appimage /usr/local/bin/nvim
  '
end

Also provide your :version output, g:esearch configs and your os version please.

eugen0329 avatar Jan 29 '21 14:01 eugen0329

Sorry, I don't have Vagrant and I don't know if I'll have time to set it up. But I did a little bit more of trial and error and now it looks like if I enable the vim-buffet extension (which has to do with tabs) then I can consistently re-produce it.

BTW here's the list of all changes to my dotfiles since I installed vim-esearch: https://github.com/kantord/perfect-arch-config/compare/7c802d0c7eada9d86af7dd0efeba5a4172fd9d7d...master#diff-87302fb5f87b2db92b62050c696feff05c177e37d6a805297579189dff0df95fR7

kantord avatar Jan 30 '21 10:01 kantord

Here is the place in vim-buffet. It gets into an infinite loop when i run the search 3rd time.

It seems that it has nothing to do with the version of the plugin you use:

if !filereadable('/tmp/vim/autoload/plug.vim')
  exe '!mkdir -p /tmp/vim/autoload && curl -fLo /tmp/vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
set runtimepath+=/tmp/vim
call plug#begin('/tmp/vim/bundle')
Plug 'eugen0329/vim-esearch', {'commit': '3409f596097b552aa367d2a85a6193ba49f15c1b'}
Plug 'bagrat/vim-buffet'
call plug#end()
PlugInstall | q
filetype plugin indent on

In case you don't have much time to communicate with the author, you can add let g:buffet_hidden_buffers = ["terminal", "quickfix", "nofile"] workaround configuration to your init.vim.

eugen0329 avatar Feb 01 '21 21:02 eugen0329