chore: use entry point open instead of lib open
cannot yet use entry point open in lib.init
This commit is contained in:
@@ -13,9 +13,7 @@ local _config = {}
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.focus()
|
function M.focus()
|
||||||
if not view.win_open() then
|
M.open()
|
||||||
lib.open()
|
|
||||||
end
|
|
||||||
view.focus();
|
view.focus();
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29,17 +27,13 @@ function M.toggle(find_file)
|
|||||||
if _config.update_focused_file.enable or find_file then
|
if _config.update_focused_file.enable or find_file then
|
||||||
M.find_file(true)
|
M.find_file(true)
|
||||||
end
|
end
|
||||||
if not view.win_open() then
|
M.open()
|
||||||
lib.open()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.open()
|
function M.open()
|
||||||
if not view.win_open() then
|
if not view.win_open() then
|
||||||
lib.open()
|
lib.open()
|
||||||
else
|
|
||||||
lib.set_target_win()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user