aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-01-25 18:44:29 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2019-01-27 12:07:06 +0100
commit2ab70cb55c80b17fb4100dd7f2d056131c02b08b (patch)
treee3a4cc06776b51d1ec4e9733d377452d0158b4c3 /src/nvim/terminal.c
parent80b75bc99aeb6ecc40e59343ec527443d882e8ec (diff)
downloadrneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.tar.gz
rneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.tar.bz2
rneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.zip
window/ui: reorganize size variables, fix terminal window size with multigrid.
wp->w_height_inner now contains the "inner" size, regardless if the window has been drawn yet or not. It should be used instead of wp->w_grid.Rows, for stuff that is not directly related to accessing the allocated grid memory, such like cursor movement and terminal size
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 489e39f784..e2e3bc5f30 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -351,9 +351,9 @@ void terminal_check_size(Terminal *term)
if (wp->w_buffer && wp->w_buffer->terminal == term) {
window_seen = true;
const uint16_t win_width =
- (uint16_t)(MAX(0, wp->w_width - win_col_off(wp)));
+ (uint16_t)(MAX(0, wp->w_width_inner - win_col_off(wp)));
width = MAX(width, win_width);
- height = (uint16_t)MAX(height, wp->w_height);
+ height = (uint16_t)MAX(height, wp->w_height_inner);
}
}