镜像自地址
https://github.com/sammy-ette/Hilbish
已同步 2025-08-10 02:52:03 +00:00
feat(readline): pass suggestions to history searcher callback
这个提交包含在:
父节点
001bd15ced
当前提交
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.
|
||||
|
||||
正在加载...
x
在新工单中引用
屏蔽一个用户