mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-13 00:20:20 +08:00
Cancel key reading when 'execute' triggered via a server request (#4653)
Fix #4524 Close #4648
This commit is contained in:
1 parent
3c7cbc9d47
commit
3f94bcb5bf
8 files changed
+175
-42
No files matched your search
+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