refactor(#2826): singleton View class, WIP
This commit is contained in:
@@ -198,7 +198,7 @@ end
|
||||
|
||||
local function open_file_in_tab(filename)
|
||||
if M.quit_on_open then
|
||||
view.close()
|
||||
view.View:close()
|
||||
end
|
||||
if M.relative_path then
|
||||
filename = utils.path_relative(filename, vim.fn.getcwd())
|
||||
@@ -208,7 +208,7 @@ end
|
||||
|
||||
local function drop(filename)
|
||||
if M.quit_on_open then
|
||||
view.close()
|
||||
view.View:close()
|
||||
end
|
||||
if M.relative_path then
|
||||
filename = utils.path_relative(filename, vim.fn.getcwd())
|
||||
@@ -218,7 +218,7 @@ end
|
||||
|
||||
local function tab_drop(filename)
|
||||
if M.quit_on_open then
|
||||
view.close()
|
||||
view.View:close()
|
||||
end
|
||||
if M.relative_path then
|
||||
filename = utils.path_relative(filename, vim.fn.getcwd())
|
||||
@@ -427,7 +427,7 @@ function M.fn(mode, filename)
|
||||
end
|
||||
|
||||
if M.quit_on_open then
|
||||
view.close()
|
||||
view.View:close()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ function M.fn(opts, no_focus, cwd, bang)
|
||||
|
||||
if view.is_visible() then
|
||||
-- close
|
||||
view.close()
|
||||
view.View:close()
|
||||
else
|
||||
-- open
|
||||
lib.open({
|
||||
|
||||
Reference in New Issue
Block a user