mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 12:45:17 -07:00
fix(api): redundant error when using nvim_cmd
(#24010)
`nvim_cmd` shows multiple errors when attempting to edit another buffer through a command when `curbuf->b_ro_locked` is set. This PR fixes that by removing a redundant error in `execute_cmd`.
This commit is contained in:
parent
4c7cec4e29
commit
a9968912b7
@ -1690,7 +1690,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);
|
||||
|
Loading…
Reference in New Issue
Block a user