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

bufnext is laggy #136

Open
gbrlsnchs opened this issue Jul 30, 2020 · 0 comments
Open

bufnext is laggy #136

gbrlsnchs opened this issue Jul 30, 2020 · 0 comments

Comments

@gbrlsnchs
Copy link

Environment (please complete the following information):

  • OS: Void Linux (kernel 5.7)

  • Neovim version: 0.5.0 (nightly)

  • Have you reproduced with a minimal vimrc: yes

Describe the bug
When choosing a mapping with bnext as the command, there's a delay before going to the correct buffer. It seems the floating window is picked by the command and after a timeout, the correct buffer is chosen.

To Reproduce
Steps to reproduce the behavior:

  1. Create the minimal vimrc min.vim:
set nocompatible
set runtimepath^=/path/to/vim-which-key
syntax on
filetype plugin indent on

let mapleader = "\<Space>"
let g:which_key_map =  {
      \ 'b': {
      \   'name': '+buffer',
      \   'n': ['bnext', 'next-buffer'],
      \  }
      \ }
call which_key#register('<Space>', "g:which_key_map")
nnoremap <silent> <Leader> :WhichKey '<Space>'<CR>
  1. Start (neo)vim with command: vim -u min.vim

  2. Type Space then b then n

  3. Notice that it's laggy to switch to next buffer because the floating window itself is being selected before going to the next buffer.

Expected behavior
Change to the next buffer immediately, not the floating window and then the correct buffer.

Additional context
This doesn't happen with bprevious, only with bnext.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant