aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/command.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-03-22 10:09:28 +0000
committerGitHub <noreply@github.com>2023-03-22 10:09:28 +0000
commit3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f (patch)
tree4357dab570945b69f7ee3c4406c45c1153222049 /src/nvim/api/command.c
parentc45b5e2c5b0f02742099ebccc44462fe4203e99c (diff)
downloadrneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.tar.gz
rneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.tar.bz2
rneovim-3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f.zip
refactor: do more in TRY_WRAP
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r--src/nvim/api/command.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c
index de766c14b9..1455f28050 100644
--- a/src/nvim/api/command.c
+++ b/src/nvim/api/command.c
@@ -697,8 +697,7 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
capture_ga = &capture_local;
}
- TRY_WRAP({
- try_start();
+ TRY_WRAP(err, {
if (output) {
msg_silent++;
msg_col = 0; // prevent leading spaces
@@ -714,8 +713,6 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
// Put msg_col back where it was, since nothing should have been written.
msg_col = save_msg_col;
}
-
- try_end(err);
});
if (ERROR_SET(err)) {