0
0
mirror of https://github.com/vim/vim.git synced 2025-10-17 07:44:28 -04:00

patch 9.0.1923: curswant wrong on click with 've' and 'wrap' set

Problem:  curswant wrong on click with 've' and 'wrap' set
Solution: Add w_leftcol to mouse click column.

closes: #13142

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-09-21 16:33:09 +02:00
committed by Christian Brabandt
parent a7aba6ca50
commit db54e989b5
5 changed files with 80 additions and 9 deletions

View File

@@ -3852,7 +3852,14 @@ win_line(
else
ScreenAttrs[wlv.off] = wlv.char_attr;
ScreenCols[wlv.off] = wlv.vcol;
if (wlv.draw_state > WL_NR
#ifdef FEAT_DIFF
&& wlv.filler_todo <= 0
#endif
)
ScreenCols[wlv.off] = wlv.vcol;
else
ScreenCols[wlv.off] = -1;
if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
{
@@ -3865,19 +3872,21 @@ win_line(
else
// DBCS: Put second byte in the second screen char.
ScreenLines[wlv.off] = mb_c & 0xff;
if (wlv.draw_state > WL_NR
#ifdef FEAT_DIFF
&& wlv.filler_todo <= 0
#endif
)
++wlv.vcol;
ScreenCols[wlv.off] = ++wlv.vcol;
else
ScreenCols[wlv.off] = -1;
// When "wlv.tocol" is halfway a character, set it to the end
// of the character, otherwise highlighting won't stop.
if (wlv.tocol == wlv.vcol)
++wlv.tocol;
ScreenCols[wlv.off] = wlv.vcol;
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
{