mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
7a73252063
commit
10792feebd
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user