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

Unwanted 'eventignore' effects for NERDTreeFocus #1112

Closed
11 tasks done
cdelledonne opened this issue Apr 27, 2020 · 0 comments · Fixed by #1118
Closed
11 tasks done

Unwanted 'eventignore' effects for NERDTreeFocus #1112

cdelledonne opened this issue Apr 27, 2020 · 0 comments · Fixed by #1118
Labels

Comments

@cdelledonne
Copy link

Self-Diagnosis

  • I have searched the issues for an answer to my question.
  • I have reviewed the NERDTree documentation. :h NERDTree
  • I have reviewed the Wiki.
  • I have searched the web for an answer to my question.

Environment (for bug reports)

  • Operating System: Linux (kernel 5.5.17)

  • Vim/Neovim version :echo v:version: 800 (NVIM v0.4.3)

  • NERDTree version, found on 1st line in NERDTree quickhelp ?: 6.7.7

  • vimrc settings

    • Relevant autocmds
    autocmd VimEnter,BufEnter,WinEnter * setlocal cursorline
    autocmd BufLeave,WinLeave * setlocal nocursorline
    • NERDTree variables
    let NERDTreeShowHidden = 1
    let NERDTreeSortHiddenFirst = 1
    let NERDTreeIgnore = ['.DS_Store', '\.swp$', '\~$']
    let NERDTreeStatusline = 'NERDTree'
    • I've verified the issue occurs with only NERDTree installed.

Steps to Reproduce the Issue

Run nvim, then

:e file.txt
:NERDTreeFocus
:wincmd p
:NERDTreeFocus

Current Result (Include screenshots where appropriate.)

  1. When running the first :NERDTreeFocus, the cursor line appears in the NERDTree window and disappears from the other window (expected)
  2. When running the second :NERDTreeFocus, the function s:NERDTree.CursorToTreeWin() from lib/nerdtree/nerdtree.vim is triggered, and my custom autocmds are not run, thus the cursor line does not appear in the NERDTree window, and remains visible in the other window (NOT expected)

Expected Result

I would expect custom autocmds to be run when switching to the NERDTree window with :NERDTreeFocus, even when the NERDTree window is already open. I went through someof the related issues, but I do not understand why all events are disabled when jumping to the NERDTree window.

Related issues

#900, #684, #261 (all closed though).

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

Successfully merging a pull request may close this issue.

1 participant