diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-15 10:25:06 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-15 11:41:13 +0000 |
commit | 716df377b4bbf1ec64c1115ccc652b5b24797869 (patch) | |
tree | f7c07956ecba334869147f2447192bcf1c8f8d25 /src/nvim/eval | |
parent | 4a8b6bde019ea63a7ad74fbf7defc0156497f2e5 (diff) | |
download | rneovim-716df377b4bbf1ec64c1115ccc652b5b24797869.tar.gz rneovim-716df377b4bbf1ec64c1115ccc652b5b24797869.tar.bz2 rneovim-716df377b4bbf1ec64c1115ccc652b5b24797869.zip |
vim-patch:8.2.4568: getmousepos() does not compute the column below the last line
Problem: getmousepos() does not compute the column below the last line.
Solution: Also compute the column when the mouse is below the last line.
(Sean Dewar, closes vim/vim#9946)
https://github.com/vim/vim/commit/10792feebd237aee89270669e509e85cafdfac60
test_setmouse is N/A.
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/funcs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index edb254e15f..738ed7f85e 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -3753,9 +3753,8 @@ static void f_getmousepos(typval_T *argvars, typval_T *rettv, FunPtr fptr) winrow = row + 1 + wp->w_border_adj[0]; // Adjust by 1 for top border wincol = col + 1 + wp->w_border_adj[3]; // Adjust by 1 for left border if (row >= 0 && row < wp->w_height && col >= 0 && col < wp->w_width) { - if (!mouse_comp_pos(wp, &row, &col, &lnum)) { - col = vcol2col(wp, lnum, col); - } + (void)mouse_comp_pos(wp, &row, &col, &lnum); + col = vcol2col(wp, lnum, col); column = col + 1; } } |