From 7ec0d1f9fdca5ddf767c1ce89590984e9a40ee78 Mon Sep 17 00:00:00 2001 From: "Phil Runninger (mac)" Date: Fri, 15 Feb 2019 03:08:00 -0500 Subject: [PATCH] Set a maximum window size when zooming. --- doc/NERDTree.txt | 3 +++ lib/nerdtree/ui.vim | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/NERDTree.txt b/doc/NERDTree.txt index b86cdf11..174b7f78 100644 --- a/doc/NERDTree.txt +++ b/doc/NERDTree.txt @@ -702,6 +702,9 @@ the NERD tree. These settings should be set in your vimrc, using `:let`. |NERDTreeWinSize| Sets the window size when the NERD tree is opened. +|NERDTreeWinSizeMax| Sets the maximum window size when the NERD tree + is zoomed. + |NERDTreeMinimalUI| Disables display of the 'Bookmarks' label and 'Press ? for help' text. diff --git a/lib/nerdtree/ui.vim b/lib/nerdtree/ui.vim index 32d96d9b..5e3fcf1d 100644 --- a/lib/nerdtree/ui.vim +++ b/lib/nerdtree/ui.vim @@ -503,7 +503,7 @@ function! s:UI.toggleZoom() exec "silent vertical resize ". size let b:NERDTreeZoomed = 0 else - exec "vertical resize" + exec "vertical resize ". get(g:, 'NERDTreeWinSizeMax', '') let b:NERDTreeZoomed = 1 endif endfunction