aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-14 18:50:44 -0400
committerGitHub <noreply@github.com>2021-05-14 18:50:44 -0400
commitc57a85d53490fe53158a0cbd768941b732926d83 (patch)
treeeea995585edb66a7522f20faaab27144ce30c271 /src/nvim/ex_docmd.c
parentba04b3d8381c1573fabbe2c78abe87b2b0dd0026 (diff)
parent520b925627604a5c3030d4e59dc2caa2f6501736 (diff)
downloadrneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.gz
rneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.bz2
rneovim-c57a85d53490fe53158a0cbd768941b732926d83.zip
Merge pull request #14532 from janlazo/vim-8.1.1433
vim-patch:8.0.1394,8.1.1967,8.2.{23,1000,1059,2354,2419,2433,2473,2850}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 555029c1fb..c557bb2438 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -212,7 +212,7 @@ void do_exmode(int improved)
while (exmode_active) {
/* Check for a ":normal" command and no more characters left. */
if (ex_normal_busy > 0 && typebuf.tb_len == 0) {
- exmode_active = FALSE;
+ exmode_active = 0;
break;
}
msg_scroll = true;
@@ -6520,6 +6520,12 @@ ex_win_close(
int need_hide;
buf_T *buf = win->w_buffer;
+ // Never close the autocommand window.
+ if (win == aucmd_win) {
+ EMSG(_(e_autocmd_close));
+ return;
+ }
+
need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
if (need_hide && !buf_hide(buf) && !forceit) {
if ((p_confirm || cmdmod.confirm) && p_write) {
@@ -6589,9 +6595,6 @@ static void ex_tabonly(exarg_T *eap)
// Repeat this up to a 1000 times, because autocommands may
// mess up the lists.
for (int done = 0; done < 1000; done++) {
- FOR_ALL_TAB_WINDOWS(tp, wp) {
- assert(wp != aucmd_win);
- }
FOR_ALL_TABS(tp) {
if (tp->tp_topframe != topframe) {
tabpage_close_other(tp, eap->forceit);
@@ -7304,7 +7307,8 @@ do_exedit(
*/
if (exmode_active && (eap->cmdidx == CMD_visual
|| eap->cmdidx == CMD_view)) {
- exmode_active = FALSE;
+ exmode_active = 0;
+ ex_pressedreturn = false;
if (*eap->arg == NUL) {
/* Special case: ":global/pat/visual\NLvi-commands" */
if (global_busy) {