aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/options.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/options.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/options.c')
-rw-r--r--src/nvim/api/options.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/api/options.c b/src/nvim/api/options.c
index 7aef6e6146..502c73d02d 100644
--- a/src/nvim/api/options.c
+++ b/src/nvim/api/options.c
@@ -114,10 +114,8 @@ static buf_T *do_ft_buf(char *filetype, aco_save_T *aco, Error *err)
ftbuf->b_p_ft = xstrdup(filetype);
- TRY_WRAP({
- try_start();
+ TRY_WRAP(err, {
apply_autocmds(EVENT_FILETYPE, ftbuf->b_p_ft, ftbuf->b_fname, true, ftbuf);
- try_end(err);
});
return ftbuf;