comparison src/ex_docmd.c @ 21664:60ba361a7fdb v8.2.1382

patch 8.2.1382: Vim9: using :import in filetype plugin gives an error Commit: https://github.com/vim/vim/commit/8e1986e3896cc8c2a05fc6291a39ebb275e1cebf Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 6 22:11:06 2020 +0200 patch 8.2.1382: Vim9: using :import in filetype plugin gives an error Problem: Vim9: using :import in filetype plugin gives an error. Solution: Allow commands with the EX_LOCK_OK flag. (closes https://github.com/vim/vim/issues/6636)
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Aug 2020 22:15:05 +0200
parents 9ab43576a13b
children 860cad58f557
comparison
equal deleted inserted replaced
21663:a2e140e1cdbe 21664:60ba361a7fdb
2085 2085
2086 // Disallow editing another buffer when "curbuf_lock" is set. 2086 // Disallow editing another buffer when "curbuf_lock" is set.
2087 // Do allow ":checktime" (it is postponed). 2087 // Do allow ":checktime" (it is postponed).
2088 // Do allow ":edit" (check for an argument later). 2088 // Do allow ":edit" (check for an argument later).
2089 // Do allow ":file" with no arguments (check for an argument later). 2089 // Do allow ":file" with no arguments (check for an argument later).
2090 if (!(ea.argt & EX_CMDWIN) 2090 if (!(ea.argt & (EX_CMDWIN | EX_LOCK_OK))
2091 && ea.cmdidx != CMD_checktime 2091 && ea.cmdidx != CMD_checktime
2092 && ea.cmdidx != CMD_edit 2092 && ea.cmdidx != CMD_edit
2093 && ea.cmdidx != CMD_file 2093 && ea.cmdidx != CMD_file
2094 && !IS_USER_CMDIDX(ea.cmdidx) 2094 && !IS_USER_CMDIDX(ea.cmdidx)
2095 && curbuf_locked()) 2095 && curbuf_locked())