aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawline.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-18 10:35:41 +0800
committerGitHub <noreply@github.com>2024-03-18 10:35:41 +0800
commit9d315fb8b728355e8f1872f783b1ae9948e4fd9b (patch)
treed29bafc234075e6b7c7e451d9667fb8808c71f1d /src/nvim/drawline.c
parenteabf9de1dc8c8eeb8246491a0e389b5f9a5fde97 (diff)
downloadrneovim-9d315fb8b728355e8f1872f783b1ae9948e4fd9b.tar.gz
rneovim-9d315fb8b728355e8f1872f783b1ae9948e4fd9b.tar.bz2
rneovim-9d315fb8b728355e8f1872f783b1ae9948e4fd9b.zip
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 https://github.com/vim/vim/commit/deb2204bffa075ed5485415fc2dbd20e75d87ea4
Diffstat (limited to 'src/nvim/drawline.c')
-rw-r--r--src/nvim/drawline.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index cbe586d103..869fcdf7c0 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -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++;
}
}