From 8483f1da1e199abf68e73e8b904bc0c7e11b6fe1 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 2 Feb 2020 17:12:50 -0500 Subject: [PATCH] Make curpane only return bufpanes --- internal/action/tab.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/action/tab.go b/internal/action/tab.go index 145d8316..39e7ee8f 100644 --- a/internal/action/tab.go +++ b/internal/action/tab.go @@ -284,6 +284,10 @@ func (t *Tab) Resize() { } // CurPane returns the currently active pane -func (t *Tab) CurPane() Pane { - return t.Panes[t.active] +func (t *Tab) CurPane() *BufPane { + p, ok := t.Panes[t.active].(*BufPane) + if !ok { + return nil + } + return p }