patch 8.2.2487: terminal shows garbage after double-wide character

Problem:    Terminal shows garbage after double-wide character with a
            combining character. (Kyoichiro Yamada)
Solution:   Libvterm: do not add the width of the combining character to the
            glyph width. (closes #7801)
This commit is contained in:
Bram Moolenaar
2021-02-08 21:29:48 +01:00
parent ba98fb54ae
commit 4549dad874
4 changed files with 43 additions and 6 deletions

View File

@ -384,7 +384,8 @@ static int on_text(const char bytes[], size_t len, void *user)
abort();
}
#endif
width += this_width;
if (i == glyph_starts || this_width > width)
width = this_width;
}
chars[glyph_ends - glyph_starts] = 0;