diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-15 09:46:54 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-15 09:46:54 +0000 |
commit | 10792feebd237aee89270669e509e85cafdfac60 (patch) | |
tree | 0c36b4443c24328d4e7f7ffbc5474f43f4ffdf8a /src/mouse.c | |
parent | 7a73252063242e88a6966e9d9ae7ea8beb897518 (diff) | |
download | vim-git-10792feebd237aee89270669e509e85cafdfac60.tar.gz |
patch 8.2.4568: getmousepos() does not compute the column below the last linev8.2.4568
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 #9946)
Diffstat (limited to 'src/mouse.c')
-rw-r--r-- | src/mouse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mouse.c b/src/mouse.c index 25d6fa89a..ffbe84219 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -3099,8 +3099,8 @@ f_getmousepos(typval_T *argvars UNUSED, typval_T *rettv) col -= left_off; if (row >= 0 && row < wp->w_height && col >= 0 && col < wp->w_width) { - if (!mouse_comp_pos(wp, &row, &col, &lnum, NULL)) - col = vcol2col(wp, lnum, col); + (void)mouse_comp_pos(wp, &row, &col, &lnum, NULL); + col = vcol2col(wp, lnum, col); column = col + 1; } } |