patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap
Problem: Cursor position wrong when clicking with conceal and wrap.
Solution: Use the virtual column of the last char for ScreenCols[] in
boguscols. Remove use of MAXCOL in ScreenCols[]. Rename
third argument of wlv_screen_line() to "clear_end" as that's
clearer what it does (zeertzjq).
related: 14192
closes: #14200
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 3d6c230..f8818ff 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1028,7 +1028,8 @@
}
wp->w_winbar_items[item_idx].wb_menu = NULL; // end marker
- screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, 0);
+ screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, -1,
+ 0);
}
#endif
@@ -1363,7 +1364,7 @@
#endif
screen_line(wp, row + W_WINROW(wp), wp->w_wincol,
- wp->w_width, wp->w_width, 0);
+ wp->w_width, wp->w_width, -1, 0);
// Update w_cline_height and w_cline_folded if the cursor line was
// updated (saves a call to plines() later).
@@ -3049,7 +3050,7 @@
mch_memmove(ScreenLines2 + off,
screenline2 + r * cols,
(size_t)cols * sizeof(schar_T));
- screen_line(curwin, cmdline_row + r, 0, cols, cols, 0);
+ screen_line(curwin, cmdline_row + r, 0, cols, cols, -1, 0);
}
ret = 4;
}