File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
lua/nvim-tree/actions/node Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,15 @@ local function open_in_new_window(filename, mode)
258258 -- If `hidden` is not enabled, check if buffer in target window is
259259 -- modified, and create new split if it is.
260260 local target_bufid = vim .api .nvim_win_get_buf (target_winid )
261- if vim .api .nvim_buf_get_option (target_bufid , " modified" ) then
261+
262+ local modified
263+ if vim .fn .has " nvim-0.10" == 1 then
264+ modified = vim .api .nvim_get_option_value (" modified" , { buf = target_bufid })
265+ else
266+ modified = vim .api .nvim_buf_get_option (target_bufid , " modified" ) --- @diagnostic disable-line : deprecated
267+ end
268+
269+ if modified then
262270 if not mode :match " split$" then
263271 mode = " vsplit"
264272 end
You can’t perform that action at this time.
0 commit comments