To: vim_dev@googlegroups.com Subject: Patch 8.2.0581 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0581 (after 8.2.0547) Problem: Win32 console: the cursor position is always top-left. Solution: Revert the patch for restoring screen. Files: src/os_win32.c *** ../vim-8.2.0580/src/os_win32.c 2020-04-12 19:37:13.522297249 +0200 --- src/os_win32.c 2020-04-15 21:01:49.333104410 +0200 *************** *** 2612,2623 **** create_conin(); g_hConOut = GetStdHandle(STD_OUTPUT_HANDLE); - vtp_flag_init(); - # ifdef FEAT_RESTORE_ORIG_SCREEN // Save the initial console buffer for later restoration - if (vtp_working && p_rs) - vtp_printf("\033[?1049h"); SaveConsoleBuffer(&g_cbOrig); g_attrCurrent = g_attrDefault = g_cbOrig.Info.wAttributes; # else --- 2612,2619 ---- *************** *** 2675,2680 **** --- 2671,2677 ---- win_clip_init(); # endif + vtp_flag_init(); vtp_init(); } *************** *** 5434,5439 **** --- 5431,5439 ---- if (g_fTermcapMode) return; + if (!p_rs && USE_VTP) + vtp_printf("\033[?1049h"); + SaveConsoleBuffer(&g_cbNonTermcap); if (g_cbTermcap.IsValid) *************** *** 5501,5511 **** # ifdef FEAT_RESTORE_ORIG_SCREEN cb = exiting ? &g_cbOrig : &g_cbNonTermcap; - if (!(vtp_working && exiting)) # else cb = &g_cbNonTermcap; # endif ! RestoreConsoleBuffer(cb, p_rs); restore_console_color_rgb(); SetConsoleCursorInfo(g_hConOut, &g_cci); --- 5501,5510 ---- # ifdef FEAT_RESTORE_ORIG_SCREEN cb = exiting ? &g_cbOrig : &g_cbNonTermcap; # else cb = &g_cbNonTermcap; # endif ! RestoreConsoleBuffer(cb, p_rs); restore_console_color_rgb(); SetConsoleCursorInfo(g_hConOut, &g_cci); *************** *** 5531,5546 **** /* * Position the cursor at the leftmost column of the desired row. */ ! # ifdef FEAT_RESTORE_ORG_SCREEN ! if (!(vtp_working && exiting)) ! # endif ! SetConsoleCursorPosition(g_hConOut, coord); } ! # ifdef FEAT_RESTORE_ORIG_SCREEN ! if (vtp_working && p_rs && exiting) vtp_printf("\033[?1049l"); - # endif g_fTermcapMode = FALSE; } --- 5530,5540 ---- /* * Position the cursor at the leftmost column of the desired row. */ ! SetConsoleCursorPosition(g_hConOut, coord); } ! if (!p_rs && USE_VTP) vtp_printf("\033[?1049l"); g_fTermcapMode = FALSE; } *** ../vim-8.2.0580/src/version.c 2020-04-15 20:05:42.744054632 +0200 --- src/version.c 2020-04-15 21:03:25.304903345 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 581, /**/ -- ARTHUR: Now stand aside worthy adversary. BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch. ARTHUR: A scratch? Your arm's off. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///