diff src/drawscreen.c @ 34571:fdd232ab72ea v9.1.0184

patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap Commit: https://github.com/vim/vim/commit/d0c1b7723f7e73763597af2f97a53d94ab7ed020 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Mar 16 15:03:33 2024 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Mar 2024 15:15:04 +0100
parents 9e093c96dff6
children 80240c27c4ff
line wrap: on
line diff
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1028,7 +1028,8 @@ redraw_win_toolbar(win_T *wp)
     }
     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 @@ fold_line(
 #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 @@ redraw_asap(int type)
 		    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;
 	}