summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-27 14:14:32 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-27 14:14:32 +0200
commit2313b6125745a4ef0785b60182c6c0b600f71787 (patch)
treeecc80b82c057047572e41339e73231d8ec69df59
parent5e8e967f25085de78d7826fe5a6bebbace1c6823 (diff)
downloadvim-git-2313b6125745a4ef0785b60182c6c0b600f71787.tar.gz
patch 8.1.2085: MS-Windows: draw error moving cursor over double-cell charv8.1.2085
Problem: MS-Windows: draw error moving cursor over double-cell character. Solution: Move the cursor to the left edge if needed. (Nobuhiro Takasaki, closes #4986)
-rw-r--r--src/os_win32.c23
-rw-r--r--src/version.c2
2 files changed, 19 insertions, 6 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 3ce605759..790f75efd 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -5831,7 +5831,7 @@ delete_lines(unsigned cLines)
/*
- * Set the cursor position
+ * Set the cursor position to (x,y) (1-based).
*/
static void
gotoxy(
@@ -5841,14 +5841,25 @@ gotoxy(
if (x < 1 || x > (unsigned)Columns || y < 1 || y > (unsigned)Rows)
return;
- /* external cursor coords are 1-based; internal are 0-based */
- g_coord.X = x - 1;
- g_coord.Y = y - 1;
-
if (!USE_VTP)
+ {
+ // external cursor coords are 1-based; internal are 0-based
+ g_coord.X = x - 1;
+ g_coord.Y = y - 1;
SetConsoleCursorPosition(g_hConOut, g_coord);
+ }
else
+ {
+ // Move the cursor to the left edge of the screen to prevent screen
+ // destruction. Insider build bug.
+ if (conpty_type == 3)
+ vtp_printf("\033[%d;%dH", g_coord.Y + 1, 1);
+
vtp_printf("\033[%d;%dH", y, x);
+
+ g_coord.X = x - 1;
+ g_coord.Y = y - 1;
+ }
}
@@ -7266,7 +7277,7 @@ mch_setenv(char *var, char *value, int x UNUSED)
* Confirm until this version. Also the logic changes.
* insider preview.
*/
-#define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18898)
+#define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18990)
/*
* Not stable now.
diff --git a/src/version.c b/src/version.c
index 6c17851ec..d215e908c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2085,
+/**/
2084,
/**/
2083,