summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0250
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.0250')
-rw-r--r--data/vim/patches/8.1.0250142
1 files changed, 142 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0250 b/data/vim/patches/8.1.0250
new file mode 100644
index 000000000..50c7f4be1
--- /dev/null
+++ b/data/vim/patches/8.1.0250
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0250
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0250
+Problem: MS-Windows using VTP: windows size change incorrect.
+Solution: Call SetConsoleScreenBufferSize() first. (Nobuhiro Takasaki,
+ closes #3164)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0249/src/os_win32.c 2018-06-19 19:59:15.244704285 +0200
+--- src/os_win32.c 2018-08-07 20:45:29.601418126 +0200
+***************
+*** 3967,3972 ****
+--- 3967,4014 ----
+ }
+
+ /*
++ * Resize console buffer to 'COORD'
++ */
++ static void
++ ResizeConBuf(
++ HANDLE hConsole,
++ COORD coordScreen)
++ {
++ if (!SetConsoleScreenBufferSize(hConsole, coordScreen))
++ {
++ #ifdef MCH_WRITE_DUMP
++ if (fdDump)
++ {
++ fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n",
++ GetLastError());
++ fflush(fdDump);
++ }
++ #endif
++ }
++ }
++
++ /*
++ * Resize console window size to 'srWindowRect'
++ */
++ static void
++ ResizeWindow(
++ HANDLE hConsole,
++ SMALL_RECT srWindowRect)
++ {
++ if (!SetConsoleWindowInfo(hConsole, TRUE, &srWindowRect))
++ {
++ #ifdef MCH_WRITE_DUMP
++ if (fdDump)
++ {
++ fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n",
++ GetLastError());
++ fflush(fdDump);
++ }
++ #endif
++ }
++ }
++
++ /*
+ * Set a console window to `xSize' * `ySize'
+ */
+ static void
+***************
+*** 4019,4050 ****
+ }
+ }
+
+! if (!SetConsoleWindowInfo(g_hConOut, TRUE, &srWindowRect))
+! {
+! #ifdef MCH_WRITE_DUMP
+! if (fdDump)
+! {
+! fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n",
+! GetLastError());
+! fflush(fdDump);
+! }
+! #endif
+! }
+!
+! /* define the new console buffer size */
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! if (!SetConsoleScreenBufferSize(hConsole, coordScreen))
+ {
+! #ifdef MCH_WRITE_DUMP
+! if (fdDump)
+! {
+! fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n",
+! GetLastError());
+! fflush(fdDump);
+! }
+! #endif
+ }
+ }
+
+--- 4061,4080 ----
+ }
+ }
+
+! // define the new console buffer size
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! // In the new console call API in reverse order
+! if (!vtp_working)
+ {
+! ResizeWindow(hConsole, srWindowRect);
+! ResizeConBuf(hConsole, coordScreen);
+! }
+! else
+! {
+! ResizeConBuf(hConsole, coordScreen);
+! ResizeWindow(hConsole, srWindowRect);
+ }
+ }
+
+*** ../vim-8.1.0249/src/version.c 2018-08-07 20:01:34.245746660 +0200
+--- src/version.c 2018-08-07 20:44:49.633662912 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 250,
+ /**/
+
+--
+Vi beats Emacs to death, and then again!
+ http://linuxtoday.com/stories/5764.html
+
+ /// 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 ///