Merge pull request #24012 from neovim/backport-24010-to-release-0.9

[Backport release-0.9] fix(api): redundant error when using `nvim_cmd`
This commit is contained in:
zeertzjq
2023-06-13 21:54:13 +08:00
committed by GitHub

View File

@@ -1676,7 +1676,7 @@ int execute_cmd(exarg_T *eap, CmdParseInfo *cmdinfo, bool preview)
&& !(eap->cmdidx == CMD_file && *eap->arg == NUL)
&& !IS_USER_CMDIDX(eap->cmdidx)
&& curbuf_locked()) {
ERROR(_(e_cannot_edit_other_buf));
goto end;
}
correct_range(eap);