fix: implement clear_cache function for FFFClearCache command#336
Closed
JasonOA888 wants to merge 2 commits intodmtrKovalenko:mainfrom
Closed
fix: implement clear_cache function for FFFClearCache command#336JasonOA888 wants to merge 2 commits intodmtrKovalenko:mainfrom
JasonOA888 wants to merge 2 commits intodmtrKovalenko:mainfrom
Conversation
The :FFFClearCache user command was calling a non-existent clear_cache() function. This adds the missing implementation that clears frecency and history caches based on the scope argument. Closes dmtrKovalenko#169
Owner
|
Have you actually tested it? lmdb is mapping the files and this can crush neovim and likely wouldn’t work on windows (which is fine tbh) |
Use fuzzy.destroy_db() and fuzzy.destroy_query_db() to properly close memory-mapped LMDB files before deleting. Directly deleting the directory while files are mapped can crash Neovim. Addressed maintainer feedback on dmtrKovalenko#336
Owner
|
closed by ea1f980 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
:FFFClearCacheuser command callsrequire("fff").clear_cache(), but this function did not exist, causing an error when running the command.Changes
clear_cache(scope)function tolua/fff/main.lua"all"(default) - clears both frecency and history caches"frecency"- clears only frecency database"files"- clears only query history databaseTesting
Closes #169