Make curpane only return bufpanes

This commit is contained in:
Zachary Yedidia
2020-02-02 17:12:50 -05:00
parent 28ed47e358
commit 8483f1da1e

View File

@@ -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
}