2
2
kopie van https://github.com/Hilbis/Hilbish synced 2025-07-02 09:12:03 +00:00

feat(readline): pass suggestions to history searcher callback

This commit is contained in:
TorchedSammy 2022-07-17 18:22:00 -04:00
bovenliggende 001bd15ced
commit 3dae826578
Getekend door: sammyette
GPG sleutel-ID: 904FC49417B44DCD
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen

Bestand weergeven

@ -88,7 +88,7 @@ func (g *CompletionGroup) updateTabFind(rl *Instance) {
if rl.searchMode != HistoryFind {
g.Suggestions = g.filterSuggestions(rl)
} else {
g.Suggestions = rl.HistorySearcher(string(rl.tfLine))
g.Suggestions = rl.HistorySearcher(string(rl.tfLine), g.Suggestions)
}
// Finally, the group computes its new printing settings

Bestand weergeven

@ -201,7 +201,7 @@ type Instance struct {
RawInputCallback func([]rune) // called on all input
HistorySearcher func(string) []string
HistorySearcher func(string, []string) []string
}
// NewInstance is used to create a readline instance and initialise it with sane defaults.