summaryrefslogtreecommitdiffstats
path: root/src/arglist.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
commita4e9136f68a40b1cb0eb6df5a5f06603224a87f4 (patch)
treeba32e0d0069ad6adfd6b32d05161a03eea5e4c7c /src/arglist.c
parentReleasing progress-linux version 2:9.1.0496-1~progress7.99u1. (diff)
downloadvim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.tar.xz
vim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.zip
Merging upstream version 2:9.1.0698.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/arglist.c')
-rw-r--r--src/arglist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arglist.c b/src/arglist.c
index 187e16e..8825c8e 100644
--- a/src/arglist.c
+++ b/src/arglist.c
@@ -184,6 +184,8 @@ alist_set(
/*
* Add file "fname" to argument list "al".
* "fname" must have been allocated and "al" must have been checked for room.
+ *
+ * May trigger Buf* autocommands
*/
void
alist_add(
@@ -196,6 +198,7 @@ alist_add(
if (check_arglist_locked() == FAIL)
return;
arglist_locked = TRUE;
+ curwin->w_locked = TRUE;
#ifdef BACKSLASH_IN_FILENAME
slash_adjust(fname);
@@ -207,6 +210,7 @@ alist_add(
++al->al_ga.ga_len;
arglist_locked = FALSE;
+ curwin->w_locked = FALSE;
}
#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
@@ -365,6 +369,7 @@ alist_add_list(
mch_memmove(&(ARGLIST[after + count]), &(ARGLIST[after]),
(ARGCOUNT - after) * sizeof(aentry_T));
arglist_locked = TRUE;
+ curwin->w_locked = TRUE;
for (i = 0; i < count; ++i)
{
int flags = BLN_LISTED | (will_edit ? BLN_CURBUF : 0);
@@ -373,6 +378,7 @@ alist_add_list(
ARGLIST[after + i].ae_fnum = buflist_add(files[i], flags);
}
arglist_locked = FALSE;
+ curwin->w_locked = FALSE;
ALIST(curwin)->al_ga.ga_len += count;
if (old_argcount > 0 && curwin->w_arg_idx >= after)
curwin->w_arg_idx += count;