]> granicus.if.org Git - vim/commitdiff
patch 8.2.0451: Win32: double-width character displayed incorrectly v8.2.0451
authorBram Moolenaar <Bram@vim.org>
Thu, 26 Mar 2020 14:39:53 +0000 (15:39 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 26 Mar 2020 14:39:53 +0000 (15:39 +0100)
Problem:    Win32: double-width character displayed incorrectly.
Solution:   First move the cursor to the first column. (Nobuhiro Takasaki,
            closes #5848)

src/os_win32.c
src/version.c

index e9d22e417a4e2a47bdf88925573e3968acaf46bb..1952b3636bf6e6b71b5d4beffb3d65da16c2f9b4 100644 (file)
@@ -5821,6 +5821,12 @@ gotoxy(
 
     if (!USE_VTP)
     {
+       // There are reports of double-width characters not displayed
+       // correctly.  This workaround should fix it, similar to how it's done
+       // for VTP.
+       g_coord.X = 0;
+       SetConsoleCursorPosition(g_hConOut, g_coord);
+
        // external cursor coords are 1-based; internal are 0-based
        g_coord.X = x - 1;
        g_coord.Y = y - 1;
index 0fecc973b5be7d0764367994fce97d6c487ddf01..12e287dce598cdf6414e4f64cd64f6c7e23331e5 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    451,
 /**/
     450,
 /**/