diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-03-22 10:09:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 10:09:28 +0000 |
commit | 3285cd6eccd9b7f33cc32f992c2607c3fc4ca13f (patch) | |
tree | 4357dab570945b69f7ee3c4406c45c1153222049 /src/nvim/api/command.c | |
parent | c45b5e2c5b0f02742099ebccc44462fe4203e99c (diff) | |
download | rneovim-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.c | 5 |
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)) { |