summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1264
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.1264')
-rw-r--r--data/vim/patches/8.1.126487
1 files changed, 87 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.1264 b/data/vim/patches/8.1.1264
new file mode 100644
index 000000000..af2878b10
--- /dev/null
+++ b/data/vim/patches/8.1.1264
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1264
+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.1264
+Problem: Crash when closing window from WinBar click. (Ben Jackson)
+Solution: Check that window pointer is still valid. (closes #4337)
+Files: src/menu.c
+
+
+*** ../vim-8.1.1263/src/menu.c 2019-04-24 23:08:20.078079973 +0200
+--- src/menu.c 2019-05-04 16:52:16.192216117 +0200
+***************
+*** 2488,2494 ****
+
+ if (col >= item->wb_startcol && col <= item->wb_endcol)
+ {
+! win_T *save_curwin = NULL;
+ pos_T save_visual = VIsual;
+ int save_visual_active = VIsual_active;
+ int save_visual_select = VIsual_select;
+--- 2488,2494 ----
+
+ if (col >= item->wb_startcol && col <= item->wb_endcol)
+ {
+! win_T *save_curwin = NULL;
+ pos_T save_visual = VIsual;
+ int save_visual_active = VIsual_active;
+ int save_visual_select = VIsual_select;
+***************
+*** 2506,2514 ****
+ check_cursor();
+ }
+
+ execute_menu(NULL, item->wb_menu, -1);
+
+! if (save_curwin != NULL)
+ {
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+--- 2506,2515 ----
+ check_cursor();
+ }
+
++ // Note: the command might close the current window.
+ execute_menu(NULL, item->wb_menu, -1);
+
+! if (save_curwin != NULL && win_valid(save_curwin))
+ {
+ curwin = save_curwin;
+ curbuf = curwin->w_buffer;
+***************
+*** 2518,2523 ****
+--- 2519,2526 ----
+ VIsual_reselect = save_visual_reselect;
+ VIsual_mode = save_visual_mode;
+ }
++ if (!win_valid(wp))
++ break;
+ }
+ }
+ }
+*** ../vim-8.1.1263/src/version.c 2019-05-04 16:06:08.915310869 +0200
+--- src/version.c 2019-05-04 16:55:03.335008585 +0200
+***************
+*** 769,770 ****
+--- 769,772 ----
+ { /* Add new patch number below this line */
++ /**/
++ 1264,
+ /**/
+
+--
+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 ///