@@ -26,7 +26,15 @@ local M = {
26
26
function M .change_root (path , bufnr )
27
27
-- skip if current file is in ignore_list
28
28
if type (bufnr ) == " number" then
29
- local ft = vim .api .nvim_buf_get_option (bufnr , " filetype" ) or " "
29
+ local ft
30
+
31
+ if vim .fn .has " nvim-0.10" == 1 then
32
+ ft = vim .api .nvim_get_option_value (" filetype" , { buf = bufnr }) or " "
33
+ else
34
+ --- @diagnostic disable-next-line : deprecated
35
+ ft = vim .api .nvim_buf_get_option (bufnr , " filetype" ) or " "
36
+ end
37
+
30
38
for _ , value in pairs (_config .update_focused_file .update_root .ignore_list ) do
31
39
if utils .str_find (path , value ) or utils .str_find (ft , value ) then
32
40
return
78
86
function M .tab_enter ()
79
87
if view .is_visible { any_tabpage = true } then
80
88
local bufname = vim .api .nvim_buf_get_name (0 )
81
- local ft = vim .api .nvim_buf_get_option (0 , " ft" )
89
+
90
+ local ft
91
+ if vim .fn .has " nvim-0.10" == 1 then
92
+ ft = vim .api .nvim_get_option_value (" filetype" , { buf = 0 }) or " "
93
+ else
94
+ --- @diagnostic disable-next-line : deprecated
95
+ ft = vim .api .nvim_buf_get_option (0 , " ft" )
96
+ end
97
+
82
98
for _ , filter in ipairs (M .config .tab .sync .ignore ) do
83
99
if bufname :match (filter ) ~= nil or ft :match (filter ) ~= nil then
84
100
return
0 commit comments