1210 silent migrate more options (#1215)
This commit is contained in:
committed by
GitHub
parent
483f1550d1
commit
97d8557cb2
@@ -426,10 +426,6 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
|
|||||||
} -- END_DEFAULT_OPTS
|
} -- END_DEFAULT_OPTS
|
||||||
|
|
||||||
local function merge_options(conf)
|
local function merge_options(conf)
|
||||||
if conf and conf.update_to_buf_dir then
|
|
||||||
conf.hijack_directories = conf.update_to_buf_dir
|
|
||||||
conf.update_to_buf_dir = nil
|
|
||||||
end
|
|
||||||
return vim.tbl_deep_extend("force", DEFAULT_OPTS, conf or {})
|
return vim.tbl_deep_extend("force", DEFAULT_OPTS, conf or {})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -179,17 +179,35 @@ local g_migrations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function refactored(opts)
|
local function refactored(opts)
|
||||||
if opts.view then
|
-- mapping actions
|
||||||
if opts.view.mappings then
|
if opts.view and opts.view.mappings and opts.view.mappings.list then
|
||||||
if opts.view.mappings.list then
|
for _, m in pairs(opts.view.mappings.list) do
|
||||||
for _, m in pairs(opts.view.mappings.list) do
|
if m.action == "toggle_ignored" then
|
||||||
if m.action == "toggle_ignored" then
|
m.action = "toggle_git_ignored"
|
||||||
m.action = "toggle_git_ignored"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- update_to_buf_dir -> hijack_directories
|
||||||
|
if opts.update_to_buf_dir ~= nil then
|
||||||
|
utils.table_create_missing(opts, "hijack_directories")
|
||||||
|
if opts.hijack_directories.enable == nil then
|
||||||
|
opts.hijack_directories.enable = opts.update_to_buf_dir.enable
|
||||||
|
end
|
||||||
|
if opts.hijack_directories.auto_open == nil then
|
||||||
|
opts.hijack_directories.auto_open = opts.update_to_buf_dir.auto_open
|
||||||
|
end
|
||||||
|
opts.update_to_buf_dir = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- view.auto_resize -> actions.open_file.resize_window
|
||||||
|
if opts.view and opts.view.auto_resize ~= nil then
|
||||||
|
utils.table_create_missing(opts, "actions.open_file")
|
||||||
|
if opts.actions.open_file.resize_window == nil then
|
||||||
|
opts.actions.open_file.resize_window = opts.view.auto_resize
|
||||||
|
end
|
||||||
|
opts.view.auto_resize = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function removed(opts)
|
local function removed(opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user