Skip to content

Commit 04f99f1

Browse files
authored
fix(#2003): obey user split command for modified buffers when hidden not set (#2008)
1 parent bcb969c commit 04f99f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ local function open_in_new_window(filename, mode, win_ids)
230230
-- modified, and create new split if it is.
231231
local target_bufid = vim.api.nvim_win_get_buf(target_winid)
232232
if vim.api.nvim_buf_get_option(target_bufid, "modified") then
233-
mode = "vsplit"
233+
if not mode:match "split$" then
234+
mode = "vsplit"
235+
end
234236
end
235237
end
236238

0 commit comments

Comments
 (0)