Set a maximum window size when zooming. (#950)

This commit is contained in:
Phil Runninger 2019-02-15 03:10:28 -05:00 committed by GitHub
parent 5e8aa9e721
commit c05615fd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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 |NERDTreeWinSize| Sets the window size when the NERD tree is
opened. opened.
|NERDTreeWinSizeMax| Sets the maximum window size when the NERD tree
is zoomed.
|NERDTreeMinimalUI| Disables display of the 'Bookmarks' label and |NERDTreeMinimalUI| Disables display of the 'Bookmarks' label and
'Press ? for help' text. 'Press ? for help' text.

View File

@ -503,7 +503,7 @@ function! s:UI.toggleZoom()
exec "silent vertical resize ". size exec "silent vertical resize ". size
let b:NERDTreeZoomed = 0 let b:NERDTreeZoomed = 0
else else
exec "vertical resize" exec "vertical resize ". get(g:, 'NERDTreeWinSizeMax', '')
let b:NERDTreeZoomed = 1 let b:NERDTreeZoomed = 1
endif endif
endfunction endfunction