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

NERDTree disables event processing for wincmd and this lead to inconsistent behaviour of some other script #261

Closed
nkulikov opened this issue May 9, 2013 · 3 comments

Comments

@nkulikov
Copy link

nkulikov commented May 9, 2013

I've found that cursor movements executed internally by NERDTree plugin do not fire events like WinEnter,BufWinEnter,WinLeave so it will break some scripts like:

" Highlight cursor only in current window
augroup CursorLine
  autocmd!
  autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
  autocmd WinLeave * setlocal nocursorline
augroup END

It can be fixed by removing eventignore modifications in function! nerdtree#exec(cmd) but I'm not sure that is good enough... Is there any considerable reasons for disabling event processing?

@p1100i
Copy link

p1100i commented Jan 15, 2014

+1 same issue here.

@matt-gardner
Copy link

I just ran into the same issue with the same script (trying to only highlight the current line in the active window), and after digging through the code came to the same conclusion. I was going to post an issue here, but found this one before posting.

I tried removing the eventignore setting from nerdtree#exec, and I haven't run into any issues with it yet. It fixed the issue I was seeing, and hasn't caused anything bad to happen that I'm aware of. Is there some potential error that I've been lucky to avoid so far?

@PhilRunninger
Copy link
Member

This has been fixed in #578.

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

4 participants