mirror of
https://github.com/vim/vim.git
synced 2025-10-17 07:44:28 -04:00
patch 9.0.1602: stray character visible if marker on top of double-wide char
Problem: Stray character is visible if 'smoothscroll' marker is displayed on top of a double-wide character. Solution: When overwriting a double-width character with the 'smoothscroll' marker clear the second half. (closes #12469)
This commit is contained in:
@@ -823,6 +823,7 @@ wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
|
||||
&& !(wp->w_p_list && wp->w_lcs_chars.prec != 0))
|
||||
{
|
||||
int off = (int)(current_ScreenLine - ScreenLines);
|
||||
int max_off = off + screen_Columns;
|
||||
int skip = 0;
|
||||
|
||||
if (wp->w_p_nu && wp->w_p_rnu)
|
||||
@@ -836,6 +837,10 @@ wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
|
||||
|
||||
for (int i = 0; i < 3 && i + skip < wp->w_width; ++i)
|
||||
{
|
||||
if ((*mb_off2cells)(off, max_off) > 1)
|
||||
// When the first half of a double-width character is
|
||||
// overwritten, change the second half to a space.
|
||||
ScreenLines[off + 1] = ' ';
|
||||
ScreenLines[off] = '<';
|
||||
if (enc_utf8)
|
||||
ScreenLinesUC[off] = 0;
|
||||
|
Reference in New Issue
Block a user