diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-09 11:57:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-09 11:57:22 +0000 |
commit | d0fb907253a5c5a71b1f231f3ddec24098fb4e21 (patch) | |
tree | 5957d69d481db90e71e7e97c0c7a9497cc65072b /src/window.c | |
parent | e50507126f532a0b0ae65e201a6372b7ea5b0ccd (diff) | |
download | vim-git-d0fb907253a5c5a71b1f231f3ddec24098fb4e21.tar.gz |
patch 8.2.3764: cannot see any text when window was made zero linesv8.2.3764
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)
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index 47fb81597..b54813f4f 100644 --- a/src/window.c +++ b/src/window.c @@ -5518,6 +5518,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. */ |