preservim/nerdtree

NerdTree... after using <m> bottom panel stays bigger and wont disappear

hditano opened this issue ยท 13 comments

Hello all.
Here's my current issue/bug.
Anyone having the same problem?

Operating System: Ubuntu 22.04
Vim/Neovim version 0.7.2
NERDTree version, found on first line of quickhelp ?: 6.10.16
Are you using any of these NERDTree-dependent plugins? No nerdtree dependent plugin.
Provide a minimal .vimrc file that will reproduce the issue.

set number
set mouse=a
set numberwidth=1
set clipboard=unnamed
syntax on
set showcmd
set ruler
set cursorline
set encoding=utf-8
set showmatch
set sw=2
set relativenumber
set laststatus=2
set noshowmode
set scrolloff=8
set updatetime=300
set signcolumn=yes


call plug#begin()

Plug 'wakatime/vim-wakatime'

" LspConfig
"Plug 'neovim/nvim-lspconfig'
"Plug 'hrsh7th/cmp-nvim-lsp'
"Plug 'hrsh7th/cmp-buffer'
"Plug 'hrsh7th/cmp-path'
"Plug 'hrsh7th/cmp-cmdline'
"Plug 'hrsh7th/nvim-cmp'
"Plug 'SirVer/ultisnips'
"Plug 'quangnguyen30192/cmp-nvim-ultisnips'


Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'branch' : '0.1.x' }
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-treesitter/nvim-treesitter-context'
Plug 'preservim/nerdtree'
"Plug 'SirVer/ultisnips'
"Plug 'honza/vim-snippets'
Plug 'jiangmiao/auto-pairs'
Plug 'morhetz/gruvbox'
Plug 'shinchu/lightline-gruvbox.vim'
Plug 'maximbaz/lightline-ale'
Plug 'itchyny/lightline.vim'
Plug 'alvan/vim-closetag'
Plug 'tpope/vim-surround'

Plug 'benmills/vimux'
Plug 'christoomey/vim-tmux-navigator'

Plug 'editorconfig/editorconfig-vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'easymotion/vim-easymotion'
Plug 'mhinz/vim-signify'

Plug 'yggdroot/indentline'
Plug 'scrooloose/nerdcommenter'

Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'

call plug#end()
lua <<EOF
require'nvim-treesitter.configs'.setup {
  highlight = {
    enable = true,
  },
require'treesitter-context'.setup{
enable = true,
max_lines = 10,
  }
}
EOF
Untitled_.Aug.19.2022.8_13.PM.mp4

This is also happening to me, but in my case I strongly suspect there is a compatibility problem between NERDTree and vim 9.0

$ vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 13 2022 18:35:05)
macOS version - x86_64
Included patches: 1-200
Compiled by Homebrew
Huge 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              +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/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lm -lncurses -liconv -lintl -framework AppKit -L/usr/local/opt/lua/lib -llua5.4 -mmacosx-version-min=12.0 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE -lperl -L/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -framework CoreFoundation -lruby.3.1 -L/usr/local/Cellar/ruby/3.1.2/lib

Nerdtree Git commit has no tag, ref fc85a6f07c2cd694be93496ffad75be126240068

More tests to narrow it down to NerdTree:

  • start vim without nerdtree
  • type :set to see multiline bottom command area
  • type exit and observe the multiline area disappears
  • type :NERDTree to enable nerdtree
  • behavior described by @hditano happens

Other attempts/results:

  • Go backwards in NerdTree Git history, all the way to tag 6.9.0
    • Result: same/broken
  • Use Mac OS built-in vim, version 8.2
    • Result: works properly
  • Go back to Homebrew vim 8.2.5150
    • (hint: download vim.rb from here, then brew install vim.rb)
      • EDIT you probably also want to do brew pin vim
    • Result: works properly

This is also happening to me, but in my case I strongly suspect there is a compatibility problem between NERDTree and vim 9.0

Can confirm that this only became an issue for me once I'd upgraded from Vim 8 to 9.0

I have the same problem.

  • VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 23 2022 20:41:15)
  • Nerdtree Git commit: fc85a6f

I upgraded to neovim 0.7.3-beta on windows (latest available on choco) and was experiencing the exact same issue.
Form the commets here i can assume that this is a compatability issue between nerdtree and newer versions of vim/neovim.
At least for now downgrading to neovim 0.7.2 fixed the issue.

Not the perfect soluton but at least that way i have a workable enviorment...

I also recently upgrade to vim 9, and maybe it's related to the compatibility with vim 9

NVIM v0.8.0-dev-930-ga4e4609d6 has the same issue

Same issue here, after some testing it looks like some versions of vim 9.0 break the menu, the last known version to work is vim-9.0.135, after vim-9.0.236 it breaks, but i haven't tried any other version in between.
The issue still persist in the last version compiled from source vim-9.0.284.
I have found some workarounds until the issue is patched, first one is setting the menu to only be displayed in one line, add this in your .vimrc to do that.

let g:NERDTreeMinimalMenu=1

Another workaround I've also found is to resize the terminal or the buffers, this makes me believe the issue may have something to do with that, forcing a redraw does not seem to make any difference.

Edit: Forcing a resize solves the issue, added a pull request with those changes

Edit 2: For those who stumble around this error, it's already fixed by vim in version vim-9.0.0665, updating your vim should fix it now

I have this same problem on Vim 9. I don't know if this PR has been released, but I have the latest release of the plugin as of the time of this comment and this is still an issue. The mini menu workaround seems to be a perfect bandaid for now though

let g:NERDTreeMinimalMenu=1

Happens on neovim as well.

For those of who find their way here with this problem, there is a hot-fix here. Applying this locally seemed like the easiest fix for now.

The actual fix should be in VIM, but I use built-in vim, so this was easier for me in the short run.

Whoever is still stumbling in this issue, you should check here (as mentioned previously by @softwaregravy).
Just go to wherever the nerdtree code is (something like plugged/nerdtree/lib/nerdtree/) and reproduce the fix by inserting resize at line 175 before the end of the function. It's that simple.

rzvxa commented

This problem is specific to some early versions of Vim9 and there is a patch for it #1322.
I suggest you update your Vim if you are experiencing this problem instead of using the patch mentioned above.