comparison src/os_win32.c @ 18180:2ededa437271 v8.1.2085

patch 8.1.2085: MS-Windows: draw error moving cursor over double-cell char Commit: https://github.com/vim/vim/commit/2313b6125745a4ef0785b60182c6c0b600f71787 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 27 14:14:32 2019 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Sep 2019 14:15:03 +0200
parents 59bc3cd42cf5
children 88716bc1c20b
comparison
equal deleted inserted replaced
18179:cb074cd29fca 18180:2ededa437271
5829 } 5829 }
5830 } 5830 }
5831 5831
5832 5832
5833 /* 5833 /*
5834 * Set the cursor position 5834 * Set the cursor position to (x,y) (1-based).
5835 */ 5835 */
5836 static void 5836 static void
5837 gotoxy( 5837 gotoxy(
5838 unsigned x, 5838 unsigned x,
5839 unsigned y) 5839 unsigned y)
5840 { 5840 {
5841 if (x < 1 || x > (unsigned)Columns || y < 1 || y > (unsigned)Rows) 5841 if (x < 1 || x > (unsigned)Columns || y < 1 || y > (unsigned)Rows)
5842 return; 5842 return;
5843 5843
5844 /* external cursor coords are 1-based; internal are 0-based */
5845 g_coord.X = x - 1;
5846 g_coord.Y = y - 1;
5847
5848 if (!USE_VTP) 5844 if (!USE_VTP)
5845 {
5846 // external cursor coords are 1-based; internal are 0-based
5847 g_coord.X = x - 1;
5848 g_coord.Y = y - 1;
5849 SetConsoleCursorPosition(g_hConOut, g_coord); 5849 SetConsoleCursorPosition(g_hConOut, g_coord);
5850 }
5850 else 5851 else
5852 {
5853 // Move the cursor to the left edge of the screen to prevent screen
5854 // destruction. Insider build bug.
5855 if (conpty_type == 3)
5856 vtp_printf("\033[%d;%dH", g_coord.Y + 1, 1);
5857
5851 vtp_printf("\033[%d;%dH", y, x); 5858 vtp_printf("\033[%d;%dH", y, x);
5859
5860 g_coord.X = x - 1;
5861 g_coord.Y = y - 1;
5862 }
5852 } 5863 }
5853 5864
5854 5865
5855 /* 5866 /*
5856 * Set the current text attribute = (foreground | background) 5867 * Set the current text attribute = (foreground | background)
7264 7275
7265 /* 7276 /*
7266 * Confirm until this version. Also the logic changes. 7277 * Confirm until this version. Also the logic changes.
7267 * insider preview. 7278 * insider preview.
7268 */ 7279 */
7269 #define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18898) 7280 #define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18990)
7270 7281
7271 /* 7282 /*
7272 * Not stable now. 7283 * Not stable now.
7273 */ 7284 */
7274 #define CONPTY_STABLE_BUILD MAKE_VER(10, 0, 32767) // T.B.D. 7285 #define CONPTY_STABLE_BUILD MAKE_VER(10, 0, 32767) // T.B.D.