diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-06-13 18:55:20 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 13:55:20 +0100 |
commit | a9968912b741c44d18bc2f5ae20682006c552b97 (patch) | |
tree | 237b17079ac5af930b28bb859fe0113ab93c8b8e | |
parent | 4c7cec4e293495e69c105f883905f78af4c151c0 (diff) | |
download | rneovim-a9968912b741c44d18bc2f5ae20682006c552b97.tar.gz rneovim-a9968912b741c44d18bc2f5ae20682006c552b97.tar.bz2 rneovim-a9968912b741c44d18bc2f5ae20682006c552b97.zip |
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`.
-rw-r--r-- | src/nvim/ex_docmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 9ea9f28fa5..b854bdb6fe 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -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); |