aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-21 07:18:39 +0800
committerGitHub <noreply@github.com>2023-08-21 07:18:39 +0800
commitd21e6285e93302b6d387ad6d362b683db09c5239 (patch)
tree9e7fdb16e80ab4b8e7c3ca002168870fa1ad471d /src
parent10459e1ed0fe6429b15705567135c55e0778b262 (diff)
downloadrneovim-d21e6285e93302b6d387ad6d362b683db09c5239.tar.gz
rneovim-d21e6285e93302b6d387ad6d362b683db09c5239.tar.bz2
rneovim-d21e6285e93302b6d387ad6d362b683db09c5239.zip
vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line (#24806)
Problem: Visual highlight not working with cursor at end of screen line and 'showbreak'. Solution: Only update "vcol_prev" when drawing buffer text. closes: vim/vim#12865 https://github.com/vim/vim/commit/8fc6a1dae07aa63faa6bfe6ed93888635745830c
Diffstat (limited to 'src')
-rw-r--r--src/nvim/drawline.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index e531704970..753baa2675 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -2940,9 +2940,12 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl
wlv.char_attr = hl_combine_attr(wlv.line_attr_lowprio, wlv.char_attr);
}
+ if (wlv.draw_state == WL_LINE) {
+ vcol_prev = wlv.vcol;
+ }
+
// Store character to be displayed.
// Skip characters that are left of the screen for 'nowrap'.
- vcol_prev = wlv.vcol;
if (wlv.draw_state < WL_LINE || n_skip <= 0) {
// Store the character.
if (wp->w_p_rl && utf_char2cells(mb_c) > 1) {