open tree even when file doesn't exists
This commit is contained in:
parent
998f5f1eda
commit
1ba25ce088
@ -131,12 +131,13 @@ end
|
|||||||
function M.find_file(with_open)
|
function M.find_file(with_open)
|
||||||
local bufname = vim.fn.bufname()
|
local bufname = vim.fn.bufname()
|
||||||
local filepath = vim.fn.fnamemodify(bufname, ':p')
|
local filepath = vim.fn.fnamemodify(bufname, ':p')
|
||||||
if not is_file_readable(filepath) then return end
|
|
||||||
|
|
||||||
if with_open then
|
if with_open then
|
||||||
M.open()
|
M.open()
|
||||||
lib.win_focus()
|
lib.win_focus()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not is_file_readable(filepath) then return end
|
||||||
lib.set_index_and_redraw(filepath)
|
lib.set_index_and_redraw(filepath)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user