fix!: no confirm always when db_safe_mode is off (#162)

* fix!: no confirm always when `db_safe_mode` is off

Fix: #50
Fix: #167

Before this, `db_safe_mode = false` makes it no confirmation in
`:FrecencyValidate!`, but it still does in `:FrecencyValidate` and the
auto validation in Neovim's startup.

After this commit, `db_safe_mode = false` makes it no confirmation
always when you see.

And `force` option in `Frecency:validate_database(force)` now means
weather it should remove files less than threshold.

* docs: add notes for lacked options
This commit is contained in:
JINNOUCHI Yasushi
2024-01-22 22:34:02 +09:00
committed by GitHub
parent 9c18474d0a
commit 1189184484
2 changed files with 19 additions and 1 deletions

View File

@@ -180,7 +180,7 @@ function Frecency:validate_database(force)
self.database:remove_files(unlinked)
self:notify("removed %d missing entries.", #unlinked)
end
if force and not self.config.db_safe_mode then
if not self.config.db_safe_mode then
remove_entries()
return
end