aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-06-19 15:22:34 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-06-19 21:22:34 +0200
commit3cc7462a0cc035c6e97896c12819549ce5e31b10 (patch)
tree1adcb054885070f54d9043a031aa091d196214b8 /src/nvim/ex_getln.c
parent74d19f685faf1ee2e96ddc54ae289ed5093f4e08 (diff)
downloadrneovim-3cc7462a0cc035c6e97896c12819549ce5e31b10.tar.gz
rneovim-3cc7462a0cc035c6e97896c12819549ce5e31b10.tar.bz2
rneovim-3cc7462a0cc035c6e97896c12819549ce5e31b10.zip
vim-patch:8.0.0546: swap file exists briefly when opening the command window (#8588)
Problem: Swap file exists briefly when opening the command window. Solution: Set the noswapfile command modifier before splitting the window. (James McCoy, closes vim/vim#1620) https://github.com/vim/vim/commit/3bab93998d01a01b7f2a071fa3b8054bb0094625
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 9b1dcfcafb..774007c66e 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -861,7 +861,7 @@ static int command_line_execute(VimState *state, int key)
if (s->c == cedit_key || s->c == K_CMDWIN) {
if (ex_normal_busy == 0 && got_int == false) {
// Open a window to edit the command line (and history).
- s->c = ex_window();
+ s->c = open_cmdwin();
s->some_key_typed = true;
}
} else {
@@ -1444,7 +1444,7 @@ static int command_line_handle_key(CommandLineState *s)
return command_line_not_changed(s);
case K_IGNORE:
- // Ignore mouse event or ex_window() result.
+ // Ignore mouse event or open_cmdwin() result.
return command_line_not_changed(s);
@@ -6001,7 +6001,7 @@ int cmd_gchar(int offset)
* Ctrl_C if it is to be abandoned
* K_IGNORE if editing continues
*/
-static int ex_window(void)
+static int open_cmdwin(void)
{
struct cmdline_info save_ccline;
bufref_T old_curbuf;
@@ -6034,6 +6034,7 @@ static int ex_window(void)
block_autocmds();
/* don't use a new tab page */
cmdmod.tab = 0;
+ cmdmod.noswapfile = 1;
/* Create a window for the command-line buffer. */
if (win_split((int)p_cwh, WSP_BOT) == FAIL) {