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/terminal.c b/src/terminal.c
index a641a85..25a6a5d 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3965,7 +3965,8 @@
else
pos.col = 0;
- screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, 0);
+ screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, -1,
+ 0);
}
term->tl_dirty_row_start = MAX_ROW;
@@ -4088,7 +4089,7 @@
#ifdef FEAT_MENU
+ winbar_height(wp)
#endif
- , wp->w_wincol, pos.col, wp->w_width,
+ , wp->w_wincol, pos.col, wp->w_width, -1,
#ifdef FEAT_PROP_POPUP
popup_is_popup(wp) ? SLF_POPUP :
#endif