mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-16 23:33:39 -05:00
@@ -496,6 +496,14 @@ const (
|
|||||||
reqFatal
|
reqFatal
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func isTerminalEvent(et util.EventType) bool {
|
||||||
|
switch et {
|
||||||
|
case reqClose, reqPrintQuery, reqBecome, reqQuit, reqFatal:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type action struct {
|
type action struct {
|
||||||
t actionType
|
t actionType
|
||||||
a string
|
a string
|
||||||
@@ -5528,7 +5536,7 @@ func (t *Terminal) Loop() error {
|
|||||||
req := func(evts ...util.EventType) {
|
req := func(evts ...util.EventType) {
|
||||||
for _, event := range evts {
|
for _, event := range evts {
|
||||||
events = append(events, event)
|
events = append(events, event)
|
||||||
if event == reqClose || event == reqQuit {
|
if isTerminalEvent(event) {
|
||||||
looping = false
|
looping = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user