chore: update_root, sync_root_with_cwd, refactor with move_missing_val (#1359)

* chore: opts.update_focused_file.update_cwd -> update_root

* chore: opts.update_cwd -> sync_root_with_cwd

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val
This commit is contained in:
Alexander Courtis
2022-06-26 12:18:14 +10:00
committed by GitHub
parent b299a877ad
commit 0c13bd76a8
4 changed files with 57 additions and 42 deletions

View File

@@ -285,26 +285,9 @@ local function refactored(opts)
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
-- 2022/06/20
utils.move_missing_val(opts, "update_focused_file", "update_cwd", opts, "update_focused_file", "update_root")
utils.move_missing_val(opts, "", "update_cwd", opts, "", "sync_root_with_cwd")
end
local function removed(opts)