aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/terminal.c4
-rw-r--r--src/nvim/window.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 9195004a54..0f7e04ace2 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -313,6 +313,10 @@ void terminal_resize(Terminal *term, uint16_t width, uint16_t height)
return;
}
+ if (height == 0 || width == 0) {
+ return;
+ }
+
vterm_set_size(term->vt, height, width);
vterm_screen_flush_damage(term->vts);
term->pending_resize = true;
diff --git a/src/nvim/window.c b/src/nvim/window.c
index ef6b53fe2e..302a957d87 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4745,7 +4745,9 @@ void win_new_width(win_T *wp, int width)
wp->w_redr_status = TRUE;
if (wp->w_buffer->terminal) {
- terminal_resize(wp->w_buffer->terminal, wp->w_width, 0);
+ if (wp->w_height != 0) {
+ terminal_resize(wp->w_buffer->terminal, wp->w_width, 0);
+ }
redraw_win_later(wp, CLEAR);
}
}