diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2023-07-24 11:56:26 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2023-07-26 20:44:46 +0100 |
commit | a47be0b2d90b26905866faf5b7cc82d9c17be9bb (patch) | |
tree | 8759d99d2b3f034449a0ac73dd0d77736d1c2aec /src/nvim/api/vim.c | |
parent | 472271199e483d3f23d62c272b20c5290eec5474 (diff) | |
download | rneovim-a47be0b2d90b26905866faf5b7cc82d9c17be9bb.tar.gz rneovim-a47be0b2d90b26905866faf5b7cc82d9c17be9bb.tar.bz2 rneovim-a47be0b2d90b26905866faf5b7cc82d9c17be9bb.zip |
fix(window): prevent win_size_restore from changing cmdheight
Currently it only skips if `Rows` changed, but it's possible for the height of
the usable area for windows to change (e.g: via `&ch`, `&stal` or `&ls`), which
can cause the value of `&cmdheight` to change when the sizes are restored.
This is a Vim bug, so I've submitted a PR there too. No telling when it'll be
merged though, given the current lack of activity there.
`ROWS_AVAIL` is convenient here, but also subtracts the `global_stl_height()`.
Not ideal, as we also care about the height of the last statusline for other
values of `&ls`. Meh.
Introduce `last_stl_height` for getting the height of the last statusline and
use it in `win_size_save/restore` and `last_status` (means
`last_status_rec`'s `statusline` argument will now be true if `&ls` is 3,
but that does not change the behaviour).
Also corrects the logic in `comp_col` to not assume there's a last statusline
if `&ls` is 1 and the last window is floating.
Diffstat (limited to 'src/nvim/api/vim.c')
0 files changed, 0 insertions, 0 deletions