0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3764: cannot see any text when window was made zero lines

Problem:    Cannot see any text when window was made zero lines or zero
            columns.
Solution:   Ensure there is at least one line and column. (fixes #9307)
This commit is contained in:
Bram Moolenaar
2021-12-09 11:57:22 +00:00
parent e50507126f
commit d0fb907253
6 changed files with 59 additions and 0 deletions

View File

@@ -5517,6 +5517,18 @@ frame_comp_pos(frame_T *topfrp, int *row, int *col)
}
}
/*
* Make the current window show at least one line and one column.
*/
void
win_ensure_size()
{
if (curwin->w_height == 0)
win_setheight(1);
if (curwin->w_width == 0)
win_setwidth(1);
}
/*
* Set current window height and take care of repositioning other windows to
* fit around it.