aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-27 18:28:32 +0200
committerGitHub <noreply@github.com>2018-06-27 18:28:32 +0200
commit363a232cb4e35641036924c9edcc48d476234b59 (patch)
treea3a2d93276ec480f10d14d1a7cd1057c4cbda93b /src/nvim/ex_getln.c
parentda6874a7b26976c43115a66180c47d8230dea435 (diff)
parent33eb5833b2baefce3797f4544bc1567d0c23c9e7 (diff)
downloadrneovim-363a232cb4e35641036924c9edcc48d476234b59.tar.gz
rneovim-363a232cb4e35641036924c9edcc48d476234b59.tar.bz2
rneovim-363a232cb4e35641036924c9edcc48d476234b59.zip
Merge #8645 from janlazo/vim-8.0.0677
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index d152dfa271..4b9ef5d819 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -6057,8 +6057,10 @@ static int open_cmdwin(void)
curbuf->b_p_ma = true;
curwin->w_p_fen = false;
- /* Do execute autocommands for setting the filetype (load syntax). */
+ // Do execute autocommands for setting the filetype (load syntax).
unblock_autocmds();
+ // But don't allow switching to another buffer.
+ curbuf_lock++;
/* Showing the prompt may have set need_wait_return, reset it. */
need_wait_return = FALSE;
@@ -6071,6 +6073,7 @@ static int open_cmdwin(void)
}
set_option_value("ft", 0L, "vim", OPT_LOCAL);
}
+ curbuf_lock--;
/* Reset 'textwidth' after setting 'filetype' (the Vim filetype plugin
* sets 'textwidth' to 78). */