Add 'start' event that is triggered once when fzf finder starts

Close #1622
This commit is contained in:
Junegunn Choi
2022-10-27 00:33:05 +09:00
parent 170fc517d0
commit 168829b555
6 changed files with 39 additions and 2 deletions

View File

@@ -2362,13 +2362,21 @@ func (t *Terminal) Loop() {
}()
looping := true
_, startEvent := t.keymap[tui.Start.AsEvent()]
for looping {
var newCommand *string
changed := false
beof := false
queryChanged := false
event := t.tui.GetChar()
var event tui.Event
if startEvent {
event = tui.Start.AsEvent()
startEvent = false
} else {
event = t.tui.GetChar()
}
t.mutex.Lock()
previousInput := t.input