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)
diff --git a/src/mouse.c b/src/mouse.c
index 25d6fa8..ffbe842 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -3099,8 +3099,8 @@
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;
}
}