summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-09 11:57:22 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-09 11:57:22 +0000
commitd0fb907253a5c5a71b1f231f3ddec24098fb4e21 (patch)
tree5957d69d481db90e71e7e97c0c7a9497cc65072b /src/normal.c
parente50507126f532a0b0ae65e201a6372b7ea5b0ccd (diff)
downloadvim-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/normal.c')
-rw-r--r--src/normal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index 0fbfe9207..d3c4c7875 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -608,6 +608,11 @@ normal_cmd(
old_mapped_len = 0; // do go to Insert mode
}
+ // If the window was made so small that nothing shows, make it at least one
+ // line and one column when typing a command.
+ if (KeyTyped && !KeyStuffed)
+ win_ensure_size();
+
#ifdef FEAT_CMDL_INFO
need_flushbuf = add_to_showcmd(c);
#endif