mirror of https://github.com/Hilbis/Hilbish
feat(readline): pass suggestions to history searcher callback
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…
Reference in New Issue