From 26fa15c1476444600f30b20afd1cb1ce274d534b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:44:24 +0200 Subject: [PATCH] action: Stop action iteration in the moment the current pane isn't a `BufPane` --- internal/action/bufpane.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index cd53e688..43cc8d8c 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -169,6 +169,10 @@ func BufMapEvent(k Event, action string) { // if the action changed the current pane, update the reference h = MainTab().CurPane() success = innerSuccess + if h == nil { + // stop, in case the current pane is not a BufPane + break + } } return true }