aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-08-07 16:01:34 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-08-07 16:01:34 -0600
commita5f27a311fb28797a72b8aa16ec7122c5a1b15e4 (patch)
tree3732f7339e29431f31310aef6ffc802cf4f6255d /src/nvim/terminal.c
parent6c909fedc924d9f4257aa204b0168c6177cc5d28 (diff)
parent629169462a82f0fbb7a8911a4554894537d6776c (diff)
downloadrneovim-a5f27a311fb28797a72b8aa16ec7122c5a1b15e4.tar.gz
rneovim-a5f27a311fb28797a72b8aa16ec7122c5a1b15e4.tar.bz2
rneovim-a5f27a311fb28797a72b8aa16ec7122c5a1b15e4.zip
Merge branch 'master' of https://github.com/neovim/neovim into rahm
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index c23aff00cb..eb7c83d317 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -367,7 +367,12 @@ void terminal_check_size(Terminal *term)
vterm_get_size(term->vt, &curheight, &curwidth);
uint16_t width = 0, height = 0;
+ // Check if there is a window that displays the terminal and find the maximum width and height.
+ // Skip the autocommand window which isn't actually displayed.
FOR_ALL_TAB_WINDOWS(tp, wp) {
+ if (wp == aucmd_win) {
+ continue;
+ }
if (wp->w_buffer && wp->w_buffer->terminal == term) {
const uint16_t win_width =
(uint16_t)(MAX(0, wp->w_width_inner - win_col_off(wp)));