comparison 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
comparison
equal deleted inserted replaced
34570:68553f944407 34571:fdd232ab72ea
1026 space_to_screenline(off + col, fill_attr); 1026 space_to_screenline(off + col, fill_attr);
1027 ++col; 1027 ++col;
1028 } 1028 }
1029 wp->w_winbar_items[item_idx].wb_menu = NULL; // end marker 1029 wp->w_winbar_items[item_idx].wb_menu = NULL; // end marker
1030 1030
1031 screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, 0); 1031 screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, -1,
1032 0);
1032 } 1033 }
1033 #endif 1034 #endif
1034 1035
1035 #if defined(FEAT_FOLDING) || defined(PROTO) 1036 #if defined(FEAT_FOLDING) || defined(PROTO)
1036 /* 1037 /*
1361 ScreenAttrs[off + txtcol], HL_ATTR(HLF_CUC)); 1362 ScreenAttrs[off + txtcol], HL_ATTR(HLF_CUC));
1362 } 1363 }
1363 #endif 1364 #endif
1364 1365
1365 screen_line(wp, row + W_WINROW(wp), wp->w_wincol, 1366 screen_line(wp, row + W_WINROW(wp), wp->w_wincol,
1366 wp->w_width, wp->w_width, 0); 1367 wp->w_width, wp->w_width, -1, 0);
1367 1368
1368 // Update w_cline_height and w_cline_folded if the cursor line was 1369 // Update w_cline_height and w_cline_folded if the cursor line was
1369 // updated (saves a call to plines() later). 1370 // updated (saves a call to plines() later).
1370 if (wp == curwin 1371 if (wp == curwin
1371 && lnum <= curwin->w_cursor.lnum 1372 && lnum <= curwin->w_cursor.lnum
3047 } 3048 }
3048 if (enc_dbcs == DBCS_JPNU) 3049 if (enc_dbcs == DBCS_JPNU)
3049 mch_memmove(ScreenLines2 + off, 3050 mch_memmove(ScreenLines2 + off,
3050 screenline2 + r * cols, 3051 screenline2 + r * cols,
3051 (size_t)cols * sizeof(schar_T)); 3052 (size_t)cols * sizeof(schar_T));
3052 screen_line(curwin, cmdline_row + r, 0, cols, cols, 0); 3053 screen_line(curwin, cmdline_row + r, 0, cols, cols, -1, 0);
3053 } 3054 }
3054 ret = 4; 3055 ret = 4;
3055 } 3056 }
3056 } 3057 }
3057 3058