mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 13:03:22 +00:00
feat(readline): pass suggestions to history searcher callback
This commit is contained in:
parent
001bd15ced
commit
3dae826578
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user