mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-01 08:11:14 -03:00
Include subsequence matches in history-pager
If a `contains` search yields no results, try again with `contains_subsequence`.
This commit is contained in:
committed by
Johannes Altmanninger
parent
9043008933
commit
00692bcdfe
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user