File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function Default:buffers()
5252 local buffers = vim
5353 .iter (api .nvim_list_bufs ())
5454 :filter (function (bufnr )
55- return vim .fn .buflisted (bufnr ) == 1 and api .nvim_buf_get_option ( bufnr , " filetype" ) ~= " codecompanion"
55+ return vim .fn .buflisted (bufnr ) == 1 and api .nvim_get_option_value ( " filetype" , { buf = bufnr } ) ~= " codecompanion"
5656 end )
5757 :map (function (bufnr )
5858 return buf_utils .get_info (bufnr )
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ function M.get_info(bufnr)
5151
5252 return {
5353 bufnr = bufnr ,
54- filetype = api .nvim_buf_get_option ( bufnr , " filetype" ),
54+ filetype = api .nvim_get_option_value ( " filetype" , { buf = bufnr } ),
5555 number = bufnr ,
5656 name = vim .fn .fnamemodify (bufname , " :t" ),
5757 path = bufname ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ local M = {}
66--- @return string
77M .get_filetype = function (bufnr )
88 bufnr = bufnr or 0
9- local ft = api .nvim_buf_get_option ( bufnr , " filetype" )
9+ local ft = api .nvim_get_option_value ( " filetype" , { buf = bufnr } )
1010
1111 if ft == " cpp" then
1212 return " C++"
@@ -122,7 +122,7 @@ function M.get(bufnr, args)
122122 mode = mode ,
123123 is_visual = is_visual ,
124124 is_normal = is_normal ,
125- buftype = api .nvim_buf_get_option ( bufnr , " buftype" ) or " " ,
125+ buftype = api .nvim_get_option_value ( " buftype" , { buf = bufnr } ) or " " ,
126126 filetype = M .get_filetype (bufnr ),
127127 filename = api .nvim_buf_get_name (bufnr ),
128128 cursor_pos = cursor_pos ,
You can’t perform that action at this time.
0 commit comments