To: [email protected]
Subject: Patch 5.6a.022 (extra)
Fcc: outbox
From: Bram Moolenaar <[email protected]>
------------

Patch 5.6a.022 (extra)
Problem:    Win32 GUI: When an error in the vimrc causes a dialog to pop up
           (e.g., for an existing swap file), Vim crashes. (David Elins)
Solution:   Before showing a dialog, open the main window.
Files:      src/gui_w32.c


*** ../vim-5.6a.21/src/gui_w32.c        Mon Dec 20 09:59:12 1999
--- src/gui_w32.c       Wed Jan 12 19:27:25 2000
***************
*** 1958,1963 ****
--- 1958,1968 ----
     /* Display any pending error messages */
     mch_display_error();

+     /* Return here if the window was already opened (happens when
+      * gui_mch_dialog() is called early). */
+     if (s_hwnd != NULL)
+       return OK;
+
     /*
      * Load the tearoff bitmap
      */
***************
*** 4644,4649 ****
--- 4649,4658 ----
     if (silent_mode)
       return dfltbutton;   /* return default option */
 #endif
+
+     /* If there is no window yet, open it. */
+     if (s_hwnd == NULL && gui_mch_init() == FAIL)
+       return dfltbutton;

     if ((type < 0) || (type > VIM_LAST_TYPE))
       type = 0;
*** ../vim-5.6a.21/src/version.c        Tue Jan 11 17:05:00 2000
--- src/version.c       Wed Jan 12 19:37:14 2000
***************
*** 420,421 ****
--- 420,423 ----
 {   /* Add new patch number below this line */
+ /**/
+     22,
 /**/

--
Would you  care for a drink?   I mean, if it were, like,
disabled and you had to look after it?

--/-/---- Bram Moolenaar ---- [email protected] ---- [email protected] ---\-\--
 \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /