]> granicus.if.org Git - vim/commitdiff
patch 7.4.1429 v7.4.1429
authorBram Moolenaar <Bram@vim.org>
Sat, 27 Feb 2016 15:04:58 +0000 (16:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 27 Feb 2016 15:04:58 +0000 (16:04 +0100)
Problem:    On MS-Windows, when not use renderoptions=type:directx, drawing
            emoji will be broken.
Solution:   Fix usage of unicodepdy. (Yasuhiro Matsumoto)

src/gui_w32.c
src/version.c

index edfe24e56016a6c2c519f602f877e1495f0901fc..aff0ba26aa34aac7e19da2043c1d45269087d586 100644 (file)
@@ -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);
index 68ccf928024df08d7eb4bbf2b38422bd56ec40fa..4fde2fe853014827d9f44af029a08aeefb529172 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1429,
 /**/
     1428,
 /**/