mirror of
https://github.com/junegunn/fzf.git
synced 2026-05-04 04:45:52 +08:00
Cancel key reading when 'execute' triggered via a server request (#4653)
Fix #4524 Close #4648
This commit is contained in:
+8
-1
@@ -5615,7 +5615,7 @@ func (t *Terminal) Loop() error {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case t.keyChan <- t.tui.GetChar():
|
||||
case t.keyChan <- t.tui.GetChar(t.listenAddr != nil):
|
||||
}
|
||||
}
|
||||
}()
|
||||
@@ -5702,6 +5702,13 @@ func (t *Terminal) Loop() error {
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, action := range actions {
|
||||
if action.t == actExecute {
|
||||
t.tui.CancelGetChar()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
case callback := <-t.callbackChan:
|
||||
event = tui.Invalid.AsEvent()
|
||||
actions = append(actions, &action{t: actAsync})
|
||||
|
||||
Reference in New Issue
Block a user