summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-26 15:39:53 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-26 15:39:53 +0100
commit82e743c5b343847d88b958594ad3433213ef9405 (patch)
treefcac5abf199732db6685450e62191d8d13a24d2e /src/os_win32.c
parent7d941ee032c02a4b682201881eb5c1f1958f17ee (diff)
downloadvim-git-82e743c5b343847d88b958594ad3433213ef9405.tar.gz
patch 8.2.0451: Win32: double-width character displayed incorrectlyv8.2.0451
Problem: Win32: double-width character displayed incorrectly. Solution: First move the cursor to the first column. (Nobuhiro Takasaki, closes #5848)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index e9d22e417..1952b3636 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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;