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/vim.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/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index a8cc7aa454..4689e6b5bf 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -538,10 +538,8 @@ ArrayOf(String) nvim_get_runtime_file(String name, Boolean all, Error *err) int flags = DIP_DIRFILE | (all ? DIP_ALL : 0); - TRY_WRAP({ - try_start(); + TRY_WRAP(err, { do_in_runtimepath((name.size ? name.data : ""), flags, find_runtime_cb, &rv); - try_end(err); }); return rv; } @@ -1238,14 +1236,12 @@ void nvim_put(ArrayOf(String) lines, String type, Boolean after, Boolean follow, finish_yankreg_from_object(reg, false); - TRY_WRAP({ - try_start(); + TRY_WRAP(err, { bool VIsual_was_active = VIsual_active; msg_silent++; // Avoid "N more lines" message. do_put(0, reg, after ? FORWARD : BACKWARD, 1, follow ? PUT_CURSEND : 0); msg_silent--; VIsual_active = VIsual_was_active; - try_end(err); }); cleanup: |