patch 8.1.2085: MS-Windows: draw error moving cursor over double-cell char
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)
This commit is contained in:
@ -5831,7 +5831,7 @@ delete_lines(unsigned cLines)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the cursor position
|
* Set the cursor position to (x,y) (1-based).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gotoxy(
|
gotoxy(
|
||||||
@ -5841,14 +5841,25 @@ gotoxy(
|
|||||||
if (x < 1 || x > (unsigned)Columns || y < 1 || y > (unsigned)Rows)
|
if (x < 1 || x > (unsigned)Columns || y < 1 || y > (unsigned)Rows)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* external cursor coords are 1-based; internal are 0-based */
|
|
||||||
g_coord.X = x - 1;
|
|
||||||
g_coord.Y = y - 1;
|
|
||||||
|
|
||||||
if (!USE_VTP)
|
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);
|
SetConsoleCursorPosition(g_hConOut, g_coord);
|
||||||
|
}
|
||||||
else
|
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);
|
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.
|
* Confirm until this version. Also the logic changes.
|
||||||
* insider preview.
|
* insider preview.
|
||||||
*/
|
*/
|
||||||
#define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18898)
|
#define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18990)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Not stable now.
|
* Not stable now.
|
||||||
|
@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2085,
|
||||||
/**/
|
/**/
|
||||||
2084,
|
2084,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user