passing on the correct suggestion parameters (#2343)

mine
Jayson Wang 2023-12-14 06:24:07 +08:00 committed by GitHub
parent f6dfc3721a
commit 104bf96415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -166,12 +166,12 @@ func (p *Prompt) keyboard(evt *tcell.EventKey) *tcell.EventKey {
case tcell.KeyUp:
if s, ok := m.NextSuggestion(); ok {
p.model.SetText(s, "")
p.model.SetText(p.model.GetText(), s)
}
case tcell.KeyDown:
if s, ok := m.PrevSuggestion(); ok {
p.model.SetText(s, "")
p.model.SetText(p.model.GetText(), s)
}
case tcell.KeyTab, tcell.KeyRight, tcell.KeyCtrlF: