vim-patch:9.1.0186: cursor pos wrong on mouse click after eol with 'rl', 've' and conceal (#27903)

Problem:  Wrong cursor position when clicking after end of line with
          'rightleft', 'virtualedit' and conceal.
Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT.  Also fix
          off-by-one cursor position with 'colorcolumn' (zeertzjq).

closes: vim/vim#14218

deb2204bff
This commit is contained in:
zeertzjq
2024-03-18 10:35:41 +08:00
committed by GitHub
parent eabf9de1dc
commit 9d315fb8b7
4 changed files with 60 additions and 8 deletions

View File

@@ -2621,12 +2621,11 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
// linebuf_vcol[] already filled by the for loop above
wlv.off++;
wlv.col++;
wlv.vcol++;
if (vcol_hlc(wlv) >= rightmost_vcol) {
if (vcol_hlc(wlv) > rightmost_vcol) {
break;
}
wlv.vcol++;
}
}