Add soft failover to fast search #862
Open
+18
−11
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
Modified filelist.cpp so that if standard fast search in file panel yields no results, a second search attempt is made by searching in the middle of filename strings.
Details
Expanded file panel fast search functionality to also search for matches in the middle of the filename strings if search in the beginning of the filename strings was unsuccessful. This is very helpful in two scenarios:
Specific use case that justifies this change
A directory containing very large number sub-directories in the following format: {12345} where 12345 is a serial number. Such directlry can't be easily searched with fast search in current version of FAR because:
This pull request fixes this problem by allowing the user to directly enter characters that follow the "{" character. At the same time it does not break the standard fast search functionality because if there are strict matches in the beginning of the filename strings as per classic FAR behavior, they will be found first. New code will only resort to searching in the middle of the filename strings if the classic search was unsuccessful.