Include subsequence matches in history-pager

If a `contains` search yields no results, try again with `contains_subsequence`.
This commit is contained in:
Eddie Lebow
2023-01-15 00:41:19 -05:00
committed by Johannes Altmanninger
parent 9043008933
commit 00692bcdfe
5 changed files with 20 additions and 2 deletions

View File

@@ -119,7 +119,7 @@ bool string_suffixes_string_case_insensitive(const wcstring &proposed_suffix,
/// Returns true if needle, represented as a subsequence, is contained within haystack.
/// Note subsequence is not substring: "foo" is a subsequence of "follow" for example.
static bool subsequence_in_string(const wcstring &needle, const wcstring &haystack) {
bool subsequence_in_string(const wcstring &needle, const wcstring &haystack) {
// Impossible if needle is larger than haystack.
if (needle.size() > haystack.size()) {
return false;