This commit is contained in:
committed by
GitHub
parent
bcb969c869
commit
04f99f14b5
@@ -230,9 +230,11 @@ local function open_in_new_window(filename, mode, win_ids)
|
|||||||
-- modified, and create new split if it is.
|
-- modified, and create new split if it is.
|
||||||
local target_bufid = vim.api.nvim_win_get_buf(target_winid)
|
local target_bufid = vim.api.nvim_win_get_buf(target_winid)
|
||||||
if vim.api.nvim_buf_get_option(target_bufid, "modified") then
|
if vim.api.nvim_buf_get_option(target_bufid, "modified") then
|
||||||
|
if not mode:match "split$" then
|
||||||
mode = "vsplit"
|
mode = "vsplit"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local fname = vim.fn.fnameescape(filename)
|
local fname = vim.fn.fnameescape(filename)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user