Mercurial > vim
changeset 19789:25836c21ccf9 v8.2.0451
patch 8.2.0451: Win32: double-width character displayed incorrectly
Commit: https://github.com/vim/vim/commit/82e743c5b343847d88b958594ad3433213ef9405
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 26 15:39:53 2020 +0100
patch 8.2.0451: Win32: double-width character displayed incorrectly
Problem: Win32: double-width character displayed incorrectly.
Solution: First move the cursor to the first column. (Nobuhiro Takasaki,
closes #5848)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 26 Mar 2020 15:45:03 +0100 |
parents | ebff027f7a7f |
children | db735aadbcc2 |
files | src/os_win32.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;