diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-07 21:33:12 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-07 21:33:12 +0000 |
commit | 5555acc08e6f49afe00cbb8fefd687cb526a7cf2 (patch) | |
tree | d69b430164cd7a178e597fc07741c4d4a3d825be /src/ex_docmd.c | |
parent | 7b89edc62ddb12b74276567087f58fc015c1f8a0 (diff) |
updated for version 7.0c12
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index cff6d4ccb7..a88e798cdc 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2177,7 +2177,12 @@ do_one_cmd(cmdlinep, sourcing, goto doend; } #ifdef FEAT_AUTOCMD + /* Disallow editing another buffer when "curbuf_lock" is set. + * Do allow ":edit" (check for argument later). + * Do allow ":checktime" (it's postponed). */ if (!(ea.argt & CMDWIN) + && ea.cmdidx != CMD_edit + && ea.cmdidx != CMD_checktime # ifdef FEAT_USR_CMDS && !USER_CMDIDX(ea.cmdidx) # endif @@ -7402,6 +7407,12 @@ do_exedit(eap, old_curwin) #endif ) { +#ifdef FEAT_AUTOCMD + /* 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()) + return; +#endif n = readonlymode; if (eap->cmdidx == CMD_view || eap->cmdidx == CMD_sview) readonlymode = TRUE; |