-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zoom (key: A) with vertical split windows: When minimizing the NERDTree window, split windows not resized correctly #1302
Comments
This can be done by setting |
Thank you for the response. |
Yeah I'm having issues with vertical splits with |
Hey so I figured out that this issue is in Problem:
Solution:
This patch fixes the issue for me: diff --git a/lib/nerdtree/ui.vim b/lib/nerdtree/ui.vim
index a481ba4..d8b60c6 100644
--- a/lib/nerdtree/ui.vim
+++ b/lib/nerdtree/ui.vim
@@ -516,6 +516,9 @@ endfunction
" zoom (maximize/minimize) the NERDTree window
function! s:UI.toggleZoom()
if exists('b:NERDTreeZoomed') && b:NERDTreeZoomed
+ setlocal nowinfixwidth
+ exe "norm! \<C-w>="
+ setlocal winfixwidth
call nerdtree#exec('silent vertical resize '. g:NERDTreeWinSize, 1)
let b:NERDTreeZoomed = 0
else I only wish I didn't need to invoke "norm!", but it doesn't seem that there's any associated Ex command for the I'll submit a PR and folks can share suggestions. EDIT: |
Environment
:version
: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 19 2021 13:59:56)?
: 6.10.16Steps to Reproduce the Issue
:NERDTree
A
to Zoom (maximize NERDTree)A
again (minimize NERDTree)Current Behavior (Include screenshots where appropriate.)
When minimizing NERDTree, only the leftmost window is resized to occupy the entire window and all other split windows are left minimized.
Expected Result
All windows are resized, either back to previous sizes or at least equally split.
The text was updated successfully, but these errors were encountered: