summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-04 13:18:30 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-04 13:18:30 +0100
commit8fcb60f961bdd134599fb016c6537fd496e800f5 (patch)
treef791063d60d09085ef5181a3b3763bd3f4afb4d2 /src/evalfunc.c
parent772153f8d85c83e08427d93460a676d7f079f002 (diff)
downloadvim-git-8fcb60f961bdd134599fb016c6537fd496e800f5.tar.gz
patch 8.1.0994: relative cursor position is not calculated correctlyv8.1.0994
Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 0d996c512..7cecab065 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5762,6 +5762,8 @@ get_win_info(win_T *wp, short tpnr, short winnr)
dict_add_number(dict, "winid", wp->w_id);
dict_add_number(dict, "height", wp->w_height);
dict_add_number(dict, "winrow", wp->w_winrow + 1);
+ dict_add_number(dict, "topline", wp->w_topline);
+ dict_add_number(dict, "botline", wp->w_botline - 1);
#ifdef FEAT_MENU
dict_add_number(dict, "winbar", wp->w_winbar_height);
#endif