From 10792feebd237aee89270669e509e85cafdfac60 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Tue, 15 Mar 2022 09:46:54 +0000 Subject: 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 #9946) --- src/mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mouse.c') 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; } } -- cgit v1.2.1