]> granicus.if.org Git - vim/commitdiff
patch 8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt v8.1.0463
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Oct 2018 18:48:39 +0000 (20:48 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Oct 2018 18:48:39 +0000 (20:48 +0200)
Problem:    "simalt ~x" in .vimrc blocks swap file prompt.
Solution:   Flush buffers before prompting. (Yasuhiro Matsumoto,
            closes #3518, closes #2192)

src/memline.c
src/version.c

index c06f9571c06803e1019df4ece8733498aa1bfc0a..f7a3d06a71a95cef789789e8b2cfb9a1202d33e7 100644 (file)
@@ -4506,19 +4506,23 @@ findswapname(
 #endif
                    {
 #ifdef FEAT_GUI
-                       /* If we are supposed to start the GUI but it wasn't
-                        * completely started yet, start it now.  This makes
-                        * the messages displayed in the Vim window when
-                        * loading a session from the .gvimrc file. */
+                       // If we are supposed to start the GUI but it wasn't
+                       // completely started yet, start it now.  This makes
+                       // the messages displayed in the Vim window when
+                       // loading a session from the .gvimrc file.
                        if (gui.starting && !gui.in_use)
                            gui_start();
 #endif
-                       /* Show info about the existing swap file. */
+                       // Show info about the existing swap file.
                        attention_message(buf, fname);
 
-                       /* We don't want a 'q' typed at the more-prompt
-                        * interrupt loading a file. */
+                       // We don't want a 'q' typed at the more-prompt
+                       // interrupt loading a file.
                        got_int = FALSE;
+
+                       // If vimrc has "simalt ~x" we don't want it to
+                       // interfere with the prompt here.
+                       flush_buffers(TRUE);
                    }
 
 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
index 103483a940ec4d4f993dadf3aee93019855c4fd7..90588efd97b7b19306be47d9bef6ca9f5d6188e2 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    463,
 /**/
     462,
 /**/