feat: add auto_save_on_select_new_entry config option (#84)
Problem: users who want hands-off behaviour had no way to skip the `prompt_save_on_select_new_entry` confirmation dialog — enabling the prompt meant always being asked, with no silent auto-save path. Solution: add `auto_save_on_select_new_entry` (default `false`) which, when true, calls `M.save()` and proceeds immediately instead of showing the confirm dialog. Includes type annotations, vimdoc, and upstream tracker update for stevearc/oil.nvim#393.
This commit is contained in:
parent
082573d779
commit
a9a06b8f3b
4 changed files with 14 additions and 1 deletions
|
|
@ -788,6 +788,10 @@ M.select = function(opts, callback)
|
|||
end
|
||||
end
|
||||
if any_moved and config.prompt_save_on_select_new_entry then
|
||||
if config.auto_save_on_select_new_entry then
|
||||
M.save()
|
||||
return finish()
|
||||
end
|
||||
local ok, choice = pcall(vim.fn.confirm, 'Save changes?', 'Yes\nNo', 1)
|
||||
if not ok then
|
||||
return finish()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue