Skip to content
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

Always equal resize when toggle (horizontal) split windows #133

Open
hunter-street opened this issue Feb 11, 2015 · 3 comments
Open

Always equal resize when toggle (horizontal) split windows #133

hunter-street opened this issue Feb 11, 2015 · 3 comments

Comments

@hunter-street
Copy link

I have (horizontal) split windows and manually set the sizes. But when I switch focus between windows VIM always equally resize them.

@hunter-street
Copy link
Author

I am not a VIM plugin writter but I found below change will fix it somehow...

diff --git a/plugin/minibufexpl.vim b/plugin/minibufexpl.vim
index 8ef2aa8..74d33e5 100644
--- a/plugin/minibufexpl.vim
+++ b/plugin/minibufexpl.vim
@@ -1190,7 +1190,7 @@ function! ResizeWindow()

 let saved_ead = &ead
 let &ead = 'ver'
  • set equalalways
  • set noequalalways
    let &ead = saved_ead
    set noequalalways

@gerroon
Copy link

gerroon commented Mar 23, 2015

man I spent hours trying to figure this out :( It was this plugin that was causing the issue, so annoying. It would be nice if the author just fixes this because it is harder to to use a custom patch because using a vim plugin manager means it will be overwritten at some piunt

@Marek77
Copy link

Marek77 commented May 22, 2015

Just fell victim to this as well on Fedora 21 / vim 7.4. In case someone needs to reproduce:

  • start a "clean" vim
    $ vim -N -u /dev/null -i /dev/null --noplugin
  • load minibufexplorer
    :source ~/.vim/plugin/minibufexpl.vim
  • split window
    :split
  • resize the split so the two windows have different sizes
    :10wincmd +
  • toggle minibufexplorer and observe the bug
    :MBEToggle

The patch from hunter-street helps but my window layout still breaks with multiple splits. I have commented both blocks in ResizeWindow():

"    let saved_ead = &ead
"    let &ead = 'ver'
"    set equalalways
"    let &ead = saved_ead
"    set noequalalways
"    let saved_ead = &ead
"    let &ead = 'hor'
"    set equalalways
"    let &ead = saved_ead
"    set noequalalways

And now with several calls to MBEToggle all my horizontal splits end up 'minimized' at the top of the screen, below the minibufexplorer window.

cometsong added a commit to cometsong/minibufexpl.vim that referenced this issue Jun 24, 2015
brailsmt pushed a commit to brailsmt/vim-plugin-minibufexpl that referenced this issue Aug 12, 2016
arenieri added a commit to arenieri/vim-plugin-minibufexpl that referenced this issue Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants