summaryrefslogtreecommitdiffstats
path: root/src/edit.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/edit.c
parente50507126f532a0b0ae65e201a6372b7ea5b0ccd (diff)
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/edit.c')
-rw-r--r--src/edit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 686c6d429a..8dd60941a0 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -618,6 +618,11 @@ edit(
c = hkmap(c); // Hebrew mode mapping
#endif
+ // If the window was made so small that nothing shows, make it at least
+ // one line and one column when typing.
+ if (KeyTyped && !KeyStuffed)
+ win_ensure_size();
+
/*
* Special handling of keys while the popup menu is visible or wanted
* and the cursor is still in the completed word. Only when there is