From c05615fd80141c3ab04459e75a42d2ed6f030e18 Mon Sep 17 00:00:00 2001 From: Phil Runninger Date: Fri, 15 Feb 2019 03:10:28 -0500 Subject: [PATCH] Set a maximum window size when zooming. (#950) --- 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 b86cdf1..174b7f7 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 32d96d9..5e3fcf1 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