refactor(#2826): singleton View class, WIP
This commit is contained in:
@@ -239,7 +239,7 @@ local function on_preview(buf_loaded)
|
||||
once = true,
|
||||
})
|
||||
end
|
||||
view.focus()
|
||||
view.View:focus()
|
||||
end
|
||||
|
||||
local function get_target_winid(mode)
|
||||
|
||||
@@ -45,7 +45,7 @@ function M.fn(opts)
|
||||
-- focus
|
||||
if opts.focus then
|
||||
lib.set_target_win()
|
||||
view.focus()
|
||||
view.View:focus()
|
||||
end
|
||||
elseif opts.open then
|
||||
-- open
|
||||
|
||||
@@ -26,7 +26,7 @@ function M.fn(opts)
|
||||
if view.View:is_visible() then
|
||||
-- focus
|
||||
lib.set_target_win()
|
||||
view.focus()
|
||||
view.View:focus()
|
||||
else
|
||||
-- open
|
||||
lib.open({
|
||||
|
||||
Reference in New Issue
Block a user