m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 14:53:47 -05:00

Add 'one' event

Close #2629
Close #2494
Close #459
This commit is contained in:
Junegunn Choi
2023-04-01 17:16:02 +09:00
parent 1c7534f009
commit 8ec917b1c3
6 changed files with 39 additions and 0 deletions

View File

@@ -932,6 +932,12 @@ func (t *Terminal) UpdateList(merger *Merger, reset bool) {
t.cy = count - util.Min(count, t.maxItems()) + pos
}
}
if !t.reading && t.merger.Length() == 1 {
one := tui.One.AsEvent()
if _, prs := t.keymap[one]; prs {
t.eventChan <- one
}
}
t.mutex.Unlock()
t.reqBox.Set(reqInfo, nil)
t.reqBox.Set(reqList, nil)