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

CursorHold is blocked while Fern buffer is shwon #120

Closed
amerov opened this issue Jul 6, 2020 · 15 comments
Closed

CursorHold is blocked while Fern buffer is shwon #120

amerov opened this issue Jul 6, 2020 · 15 comments
Labels
bug (Neovim) Bug on Neovim itself documentation Need better documentation good first issue Good for newcomers help wanted Extra attention is needed wontfix This will not be worked on

Comments

@amerov
Copy link

amerov commented Jul 6, 2020

how to reproduce:
:autocmd CursorHold * echo 'cursor hold'
it works but stopped after open Fern

version:

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow
 -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32
 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

UPD: Fern should be open with -drawer option

@lambdalisue
Copy link
Owner

lambdalisue commented Jul 7, 2020

Could not be reproduced with the following minimal vimrc.
Please find a minimal vimrc to reproduce.

" vim -u ~/.vim/vimrc.min
if has('vim_starting')
  set nocompatible
endif

set packpath=
set runtimepath+=~/.config/nvim/pack/minpac/start/fern.vim

filetype plugin indent on
syntax on

autocmd CursorHold * echo 'cursor hold'

@lambdalisue lambdalisue added the could not reproduce The issue is not reproducable label Jul 7, 2020
@amerov
Copy link
Author

amerov commented Jul 7, 2020

How to reproduce: Open Fern with -drawer option

minimal vimrc:

call plug#begin('~/.local/share/nvim/plugged')
Plug 'lambdalisue/fern.vim'
call plug#end()

filetype plugin indent on
set nocompatible
syntax on
set updatetime=200
autocmd CursorHold * echo 'cursor hold'

@amerov amerov changed the title Stop CursorHold event Stop CursorHold event on Neovim Jul 7, 2020
@lambdalisue
Copy link
Owner

Please make it minimal.

@amerov
Copy link
Author

amerov commented Jul 7, 2020

Please make it minimal.

edited

@lambdalisue lambdalisue added bug Something isn't working help wanted Extra attention is needed and removed could not reproduce The issue is not reproducable labels Jul 7, 2020
@lambdalisue
Copy link
Owner

lambdalisue commented Jul 7, 2020

Reproduced but it seems that behavior comes from a bug on Neovim itself.
neovim/neovim#12587

Thus I'm not going to apply any modification for this behavior. Please move on to the issue above.
Thanks for the report 👍

@lambdalisue lambdalisue added wontfix This will not be worked on and removed bug Something isn't working help wanted Extra attention is needed labels Jul 7, 2020
@lambdalisue lambdalisue added the bug (Neovim) Bug on Neovim itself label Jul 7, 2020
@lambdalisue lambdalisue changed the title Stop CursorHold event on Neovim CursorHold is blocked while Fern buffer is shwon Jul 7, 2020
@antoinemadec
Copy link

@amerov , @lambdalisue , could you please try to use this plugin and tell me if it fixed it?
https://github.com/antoinemadec/FixCursorHold.nvim

@amerov
Copy link
Author

amerov commented Jul 13, 2020

@amerov , @lambdalisue , could you please try to use this plugin and tell me if it fixed it?
https://github.com/antoinemadec/FixCursorHold.nvim

It fixed CursorHold blocking, but with this plugin it fire twice

@antoinemadec
Copy link

It fixed CursorHold blocking, but with this plugin it fire twice

@amerov , I just fixed it.
Please update FixCursorHold.nvim and let me know 😃

@amerov
Copy link
Author

amerov commented Jul 14, 2020

It fixed CursorHold blocking, but with this plugin it fire twice

@amerov , I just fixed it.
Please update FixCursorHold.nvim and let me know

It works.

@bluz71
Copy link

bluz71 commented Aug 13, 2020

This Neovim bug is annoying, it breaks vim-gitgutter when a file is opened by fern and fern remains open. The gitgutter signs will not be emitted. Closing fern will result in the signs be displayed.

The interim fix is to include:

if has("nvim")
  Plug 'antoinemadec/FixCursorHold.nvim'
endif

Hopefully Neovim will be fixed eventually.

@lambdalisue lambdalisue added the documentation Need better documentation label Aug 17, 2020
@lambdalisue lambdalisue reopened this Aug 17, 2020
@lambdalisue
Copy link
Owner

Neovim took too long to fix that. Probably we should note users about this in README

@lambdalisue lambdalisue pinned this issue Aug 17, 2020
@lambdalisue lambdalisue added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 17, 2020
@lambdalisue
Copy link
Owner

Done 8433792

@lambdalisue lambdalisue unpinned this issue Aug 23, 2020
@jonescamilla
Copy link

Neovim took too long to fix that. Probably we should note users about this in README

Does this mean that this additional plugin is no longer required? I'm inferring from your statement, it took neovim a long time but the issue has been resolved.

@bluz71
Copy link

bluz71 commented Feb 7, 2021

The Neovim issue is not fixed. It is recommended to use the plugin to workaround the cursor hold issue.

@bluz71
Copy link

bluz71 commented Sep 20, 2022

Note for those concerned, Neovim fixed CursorHold issue 12587 in this PR.

Upcoming Neovim 0.8 (to be released very soon, probably before Oct 2022) will incorporate the fix (which already is in nightly).

Folks who use Neovim nightly or 0.8 can now remove the antoinemadec/FixCursorHold.nvim plugin.

lambdalisue added a commit that referenced this issue Nov 7, 2022
fix: Clarify wording about #120 in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (Neovim) Bug on Neovim itself documentation Need better documentation good first issue Good for newcomers help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants