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

"wincmd J" on window already at the bottom changes height of other windows #931

Open
blueyed opened this issue Jul 17, 2016 · 3 comments
Open

Comments

@blueyed
Copy link

blueyed commented Jul 17, 2016

Using wincmd J on a window that is at the bottom already will resize the windows above.

The following script shows this for a quickfix window, but it happens with a normal window, too.

The help says that it behaves like closing the window, and using :botright split with the old windows' buffer. But using :q | botright split does not resize the windows above.

set noequalalways
fun Heights()
  echom string(map(range(1, winnr('$')), 'winheight(v:val)'))
endfun

e 1
sp 2
copen

call Heights()
wincmd J
call Heights()

[25, 13, 10]
[18, 20, 10]

Using equalalways the behavior is similar, but different still (somehow more expected in this case - apart from that the resizing should have happened with :copen already?!):

[25, 13, 10]
[19, 19, 10]

@blueyed blueyed changed the title "wincmd J" on quickfix window changes heights of other windows "wincmd J" on window already at the bottom changes height of other windows Jul 17, 2016
@chrisbra
Copy link
Member

This is explained in the help. Since this is closing and reopening a new window, chaning the dimensions is to be expected.

CTRL-W J        Move the current window to be at the very bottom, using the
                full width of the screen.  This works like closing the current
                window and then creating another one with ":botright split",
                except that the current window contents is used for the new
                window.

@blueyed
Copy link
Author

blueyed commented Jul 19, 2016

@chrisbra
I've referred to that:

But using :q | botright split does not resize the windows above.

@chrisbra
Copy link
Member

okay, reopening then

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

2 participants