diff options
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index fed9330b52..1185cd1550 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7138,9 +7138,10 @@ do_exedit( #endif ) { - // Can't edit another file when "curbuf_lock" is set. Only ":edit" - // can bring us here, others are stopped earlier. - if (*eap->arg != NUL && curbuf_locked()) + // Can't edit another file when "textlock" or "curbuf_lock" is set. + // Only ":edit" or ":script" can bring us here, others are stopped + // earlier. + if (*eap->arg != NUL && text_or_buf_locked()) return; n = readonlymode; |