1

I've been using NERDTree forever, but recently it started doing something odd. When I open the NERDTree Menu, it adds this block of space at the bottom of the window, and I can't get rid of it (besides re-launching vim). I tried to isolate just loading NERDTree and no other plugins, but it still does it.

Please see demo:

https://i.stack.imgur.com/rrp4y.jpg

11:53:04 ~/test (|)$ cat ~/.vimrc_minimal
" Invoke with:
" vim -Nu ~/.vimrc_minimal -U NONE

let s:plugins = [] let s:plugins += ['nerdtree']

set runtimepath-=~/.vim set runtimepath-=~/.vim/after set runtimepath-=~/vimfiles set runtimepath-=~/vimfiles/after for plugin in s:plugins exec "set runtimepath^=~/.vim/plugged/". plugin exec "set runtimepath+=~/.vim/plugged/". plugin ."/after" endfor

set viminfofile=NONE

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 26 2022 01:50:42)
macOS version - arm64
Included patches: 1-270
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      -mouse_urxvt       -tag_any_white
-arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        -termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
-balloon_eval_term -gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
+builtin_terms     +iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        -vartabs
+clipboard         -keymap            +printer           +vertsplit
+cmdline_compl     +lambda            -profile           +vim9script
+cmdline_hist      -langmap           -python            +viminfo
+cmdline_info      +libcall           -python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
-conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          -rightleft         +vreplace
+cscope            +localmap          +ruby/dyn          +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            -mouse_dec         +startuptime       -xpm
-emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          -mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa
Brian Ray
  • 123
  • 5
  • Does a redraw (<C-L> or :redraw) fix it? Could be a $TERM problem – D. Ben Knoble Dec 08 '22 at 17:43
  • @D.BenKnoble It doesn't. This also happens in MacVim (which I use mostly), but I did this demo in my terminal to avoid any potential MacVim issues. Same thing happens on both. And FYI my $TERM is xterm-256color. – Brian Ray Dec 08 '22 at 19:52

1 Answers1

1

This is caused by an incompatibility between NERDTree and Vim 9.0.

You can fix it by applying this hotfix to your local copy of NERDTree.

Some alternatives:

  • Add let g:NERDTreeMinimalMenu=1 to your .vimrc to set menu to display in a single line
  • Use a version of Vim earlier than the 9.0 release

See issue #1321 in the NERDTree repo for more info.