Skip to content

Commit 26fa15c

Browse files
committed
action: Stop action iteration in the moment the current pane isn't a BufPane
1 parent 5510317 commit 26fa15c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/action/bufpane.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ func BufMapEvent(k Event, action string) {
169169
// if the action changed the current pane, update the reference
170170
h = MainTab().CurPane()
171171
success = innerSuccess
172+
if h == nil {
173+
// stop, in case the current pane is not a BufPane
174+
break
175+
}
172176
}
173177
return true
174178
}

0 commit comments

Comments
 (0)