To: vim_dev@googlegroups.com Subject: Patch 8.1.1695 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1695 Problem: Windows 10: crash when cursor is at bottom of terminal. Solution: Position the cursor before resizing. (Yasuhiro Matsumoto, closes #4679) Files: src/os_win32.c *** ../vim-8.1.1694/src/os_win32.c 2019-06-08 12:05:18.696163864 +0200 --- src/os_win32.c 2019-07-15 20:35:22.840234033 +0200 *************** *** 3738,3743 **** --- 3738,3744 ---- CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */ SMALL_RECT srWindowRect; /* hold the new console size */ COORD coordScreen; + COORD cursor; static int resized = FALSE; #ifdef MCH_WRITE_DUMP *************** *** 3792,3797 **** --- 3793,3803 ---- } else { + // Workaround for a Windows 10 bug + cursor.X = srWindowRect.Left; + cursor.Y = srWindowRect.Top; + SetConsoleCursorPosition(hConsole, cursor); + ResizeConBuf(hConsole, coordScreen); ResizeWindow(hConsole, srWindowRect); resized = TRUE; *** ../vim-8.1.1694/src/version.c 2019-07-14 21:54:23.279146889 +0200 --- src/version.c 2019-07-15 20:36:23.247699545 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1695, /**/ -- User: I'm having problems with my text editor. Help desk: Which editor are you using? User: I don't know, but it's version VI (pronounced: 6). Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). /// 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 ///