commit c05615fd80141c3ab04459e75a42d2ed6f030e18
parent 5e8aa9e721235daf49e79b341afc2f8eeff091a4
Author: Phil Runninger <PhilRunninger@users.noreply.github.com>
Date: Fri, 15 Feb 2019 03:10:28 -0500
Set a maximum window size when zooming. (#950)
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git 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
@@ -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