diff --git a/readline/comp-group.go b/readline/comp-group.go index 648b7ca..dfe61bb 100644 --- a/readline/comp-group.go +++ b/readline/comp-group.go @@ -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 diff --git a/readline/instance.go b/readline/instance.go index 97372cd..01a792e 100644 --- a/readline/instance.go +++ b/readline/instance.go @@ -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.