Skip to content
Myr

Fix reading an extra key after a terminal action

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #4578

authored by Junegunn Choi · committed by Junegunn Choi · parent e659b46 · Browse files · 1 file+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:src/terminal.go+9 added-1 removed
494 unmodified lines
495 reqQuit496 reqFatal497)498499func isTerminalEvent(et util.EventType) bool {500 switch et {501 case reqClose, reqPrintQuery, reqBecome, reqQuit, reqFatal:502 return true503 }504 return false505}506507type action struct {508 t actionType509 a string510}
5024 unmodified lines
5535 var newNth *[]Range5536 req := func(evts ...util.EventType) {5537 for _, event := range evts {5538 events = append(events, event)5531 if event == reqClose || event == reqQuit {5539 if isTerminalEvent(event) {5540 looping = false5541 }5542 }5543 }
1737 unmodified lines