It would be more efficient if we can subscribe/unsubscribe autosave whenver this parameter is changed, but I don't think the current implementation would be that expansive.
If we have a note "Atom", and if the user types "a" or "at", then lunr pipeline ignores searching them because they are stop words. However, turning off this feature might not be a good idea when we have tons of body texts. So we turn it on as a default, but provide a way to turn it off as an option.
Say we have two notes "Mark" and "Markdown". When the user type "Markd", then it will autocomplete to "Markd[own]". Say the user presses backspace key twice to make it to "Mark". In this case, we want to autoselect "Mark".
For example, if we have two notes "Car" and "Care", when we type "Ca", then it automatically fills "Care" and drops "Car". (Assume "Care" comes ahead of "Car"). However, we still want to search with "Ca".
This is a regression caused by docquery integration (56821bccbc). indexof always returns -1. Since the selected item is always the first filtered item, we can safely set it to 1.
1. Setting the default directory to the root makes it to read navigate files, which takes forever. Maybe we should set a timeout, but not for now.
2. We don't want to read the directory every time we toggle on. After toggle off, the package should still be there. Yes, this will consume lots of memory, but it would be like that for now.
If there is a match in the title, it automatically selects the title. However, this does not considers auto-filling. Without this auto-filling, we cannot discern between a note selection and a note creating. If we implement auto-filling later, then the non-initial partial title matching filter should be turned off.
Other changes that is not related to this CL.
- Sort notes by modified time.
- Delete debug messages.
Add a feature to read markdown files only
Why we ditch FuzzyFilter?
1. It doesn't give a priority on the title match
2. It seems like to give unexpected search scores in a very, very long text