Mercurial > vim
comparison src/memline.c @ 14903:c1ee9f32bec3 v8.1.0463
patch 8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt
commit https://github.com/vim/vim/commit/798184cc67036285a24b38c0bf6668d4d1525548
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 7 20:48:39 2018 +0200
patch 8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt
Problem: "simalt ~x" in .vimrc blocks swap file prompt.
Solution: Flush buffers before prompting. (Yasuhiro Matsumoto,
closes #3518, closes #2192)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Oct 2018 21:00:05 +0200 |
parents | 27b9a84395b5 |
children | c97b4b537572 |
comparison
equal
deleted
inserted
replaced
14902:72fe7891fad8 | 14903:c1ee9f32bec3 |
---|---|
4504 | 4504 |
4505 if (choice == 0) | 4505 if (choice == 0) |
4506 #endif | 4506 #endif |
4507 { | 4507 { |
4508 #ifdef FEAT_GUI | 4508 #ifdef FEAT_GUI |
4509 /* If we are supposed to start the GUI but it wasn't | 4509 // If we are supposed to start the GUI but it wasn't |
4510 * completely started yet, start it now. This makes | 4510 // completely started yet, start it now. This makes |
4511 * the messages displayed in the Vim window when | 4511 // the messages displayed in the Vim window when |
4512 * loading a session from the .gvimrc file. */ | 4512 // loading a session from the .gvimrc file. |
4513 if (gui.starting && !gui.in_use) | 4513 if (gui.starting && !gui.in_use) |
4514 gui_start(); | 4514 gui_start(); |
4515 #endif | 4515 #endif |
4516 /* Show info about the existing swap file. */ | 4516 // Show info about the existing swap file. |
4517 attention_message(buf, fname); | 4517 attention_message(buf, fname); |
4518 | 4518 |
4519 /* We don't want a 'q' typed at the more-prompt | 4519 // We don't want a 'q' typed at the more-prompt |
4520 * interrupt loading a file. */ | 4520 // interrupt loading a file. |
4521 got_int = FALSE; | 4521 got_int = FALSE; |
4522 | |
4523 // If vimrc has "simalt ~x" we don't want it to | |
4524 // interfere with the prompt here. | |
4525 flush_buffers(TRUE); | |
4522 } | 4526 } |
4523 | 4527 |
4524 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) | 4528 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) |
4525 if (swap_exists_action != SEA_NONE && choice == 0) | 4529 if (swap_exists_action != SEA_NONE && choice == 0) |
4526 { | 4530 { |