diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-08 21:29:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-08 21:29:48 +0100 |
commit | 4549dad874244fe933b969e4ac0b41923ee70dc3 (patch) | |
tree | f8a016a4e385e8b4aa0c5c78faee169b267db343 /src/libvterm | |
parent | ba98fb54aefada4c36390add4c7dd90b93e7e5bb (diff) | |
download | vim-git-4549dad874244fe933b969e4ac0b41923ee70dc3.tar.gz |
patch 8.2.2487: terminal shows garbage after double-wide characterv8.2.2487
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)
Diffstat (limited to 'src/libvterm')
-rw-r--r-- | src/libvterm/src/state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libvterm/src/state.c b/src/libvterm/src/state.c index 390aa8dce..afb188c7e 100644 --- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -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; |