aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-24 21:02:45 +0800
committerGitHub <noreply@github.com>2022-08-24 21:02:45 +0800
commitf91b1885ddeaf971e17afe49b80f1b1412ecc8a2 (patch)
tree889f79e5f876452e6863c51942c205b1dfcbcc8a /src/nvim/eval.c
parentb0fdce55d02c1da7da3257b33b91e974f89eceef (diff)
downloadrneovim-f91b1885ddeaf971e17afe49b80f1b1412ecc8a2.tar.gz
rneovim-f91b1885ddeaf971e17afe49b80f1b1412ecc8a2.tar.bz2
rneovim-f91b1885ddeaf971e17afe49b80f1b1412ecc8a2.zip
feat(eval)!: make Vim functions return inner window width and height (#19743)
In non-multigrid UI the only change is that the returned height now excludes winbar, and this is compatible with Vim. In multigrid UI this means the return value of these functions now reflect the space available for buffer lines in a window. No change in nvim_win_get_height() and nvim_win_get_width().
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 04f7347e1c..10bfbf55bf 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -5228,12 +5228,12 @@ dict_T *get_win_info(win_T *wp, int16_t tpnr, int16_t winnr)
tv_dict_add_nr(dict, S_LEN("tabnr"), tpnr);
tv_dict_add_nr(dict, S_LEN("winnr"), winnr);
tv_dict_add_nr(dict, S_LEN("winid"), wp->handle);
- tv_dict_add_nr(dict, S_LEN("height"), wp->w_height);
+ tv_dict_add_nr(dict, S_LEN("height"), wp->w_height_inner);
tv_dict_add_nr(dict, S_LEN("winrow"), wp->w_winrow + 1);
tv_dict_add_nr(dict, S_LEN("topline"), wp->w_topline);
tv_dict_add_nr(dict, S_LEN("botline"), wp->w_botline - 1);
tv_dict_add_nr(dict, S_LEN("winbar"), wp->w_winbar_height);
- tv_dict_add_nr(dict, S_LEN("width"), wp->w_width);
+ tv_dict_add_nr(dict, S_LEN("width"), wp->w_width_inner);
tv_dict_add_nr(dict, S_LEN("bufnr"), wp->w_buffer->b_fnum);
tv_dict_add_nr(dict, S_LEN("wincol"), wp->w_wincol + 1);
tv_dict_add_nr(dict, S_LEN("textoff"), win_col_off(wp));