m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Fix reading an extra key after a terminal action

Fix #4578
This commit is contained in:
Junegunn Choi
2025-11-09 15:35:14 +09:00
parent e659b46ff5
commit 8a05083503

View File

@@ -496,6 +496,14 @@ const (
reqFatal
)
func isTerminalEvent(et util.EventType) bool {
switch et {
case reqClose, reqPrintQuery, reqBecome, reqQuit, reqFatal:
return true
}
return false
}
type action struct {
t actionType
a string
@@ -5528,7 +5536,7 @@ func (t *Terminal) Loop() error {
req := func(evts ...util.EventType) {
for _, event := range evts {
events = append(events, event)
if event == reqClose || event == reqQuit {
if isTerminalEvent(event) {
looping = false
}
}