Mercurial > vim
changeset 8273:0c3210caefa6 v7.4.1429
commit https://github.com/vim/vim/commit/d804fdf4c25435284333258856bc265f1ff10b09
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 27 16:04:58 2016 +0100
patch 7.4.1429
Problem: On MS-Windows, when not use renderoptions=type:directx, drawing
emoji will be broken.
Solution: Fix usage of unicodepdy. (Yasuhiro Matsumoto)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 27 Feb 2016 16:15:04 +0100 |
parents | e34e1550788d |
children | fbf8242df3a4 |
files | src/gui_w32.c src/version.c |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -6658,7 +6658,13 @@ gui_mch_draw_string( /* Use unicodepdy to make characters fit as we expect, even * when the font uses different widths (e.g., bold character * is wider). */ - unicodepdy[clen] = cw * gui.char_width; + if (c >= 0x10000) + { + unicodepdy[wlen - 2] = cw * gui.char_width; + unicodepdy[wlen - 1] = 0; + } + else + unicodepdy[wlen - 1] = cw * gui.char_width; } cells += cw; i += utfc_ptr2len_len(text + i, len - i);