diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-09 23:12:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-09 23:12:33 +0100 |
commit | 3cb89cafe3e99fc64f6fd6fff47831d1a9331b4e (patch) | |
tree | d1425262042fabbf9c3c575270cc7ab5f73ebd2e /src/nvim/eval.c | |
parent | 6eca56c6c5a994be77ad6fd28a3639d963cb7ffc (diff) | |
download | rneovim-3cb89cafe3e99fc64f6fd6fff47831d1a9331b4e.tar.gz rneovim-3cb89cafe3e99fc64f6fd6fff47831d1a9331b4e.tar.bz2 rneovim-3cb89cafe3e99fc64f6fd6fff47831d1a9331b4e.zip |
vim-patch:8.1.0994: fix relative cursor position #9676
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.
https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 57777f049a..c23177f23a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10316,6 +10316,8 @@ static dict_T *get_win_info(win_T *wp, int16_t tpnr, int16_t 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("winrow"), wp->w_winrow); + 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("width"), wp->w_width); tv_dict_add_nr(dict, S_LEN("bufnr"), wp->w_buffer->b_fnum); tv_dict_add_nr(dict, S_LEN("wincol"), wp->w_wincol); |