aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/file_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r--src/nvim/file_search.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index c6f2166dab..5b17b58781 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -1541,26 +1541,30 @@ void do_autocmd_dirchanged(char *new_dir, CdScope scope)
char buf[8];
switch (scope) {
- case kCdScopeGlobal:
- snprintf(buf, sizeof(buf), "global");
- break;
- case kCdScopeTab:
- snprintf(buf, sizeof(buf), "tab");
- break;
- case kCdScopeWindow:
- snprintf(buf, sizeof(buf), "window");
- break;
- case kCdScopeInvalid:
- // Should never happen.
- assert(false);
+ case kCdScopeGlobal: {
+ snprintf(buf, sizeof(buf), "global");
+ break;
+ }
+ case kCdScopeTab: {
+ snprintf(buf, sizeof(buf), "tab");
+ break;
+ }
+ case kCdScopeWindow: {
+ snprintf(buf, sizeof(buf), "window");
+ break;
+ }
+ case kCdScopeInvalid: {
+ // Should never happen.
+ assert(false);
+ }
}
- tv_dict_add_str(dict, S_LEN("scope"), buf);
+ tv_dict_add_str(dict, S_LEN("scope"), buf); // -V614
tv_dict_add_str(dict, S_LEN("cwd"), new_dir);
tv_dict_set_keys_readonly(dict);
apply_autocmds(EVENT_DIRCHANGED, (char_u *)buf, (char_u *)new_dir, false,
- NULL);
+ curbuf);
tv_dict_clear(dict);