Actually the TermPane isn't really considered as a Pane, even it really is a Pane.
-> In the first version of this PR I added the Name() function to the TermPane to be able to consider the TermPane as a Pane in the future.
The main change to fix the crash is the check the return of MainTab().CurPane() against nil in the BufMapEvent() respective bufAction() function, because CurPane() will return it in the moment the current pane changes to a pane other than a BufPane.
Actually the
TermPane
isn't really considered as aPane
, even it really is aPane
. -> In the first version of this PR I added theName()
function to theTermPane
to be able to consider theTermPane
as aPane
in the future.The main change to fix the crash is the check the return of
MainTab().CurPane()
againstnil
in theBufMapEvent()
respectivebufAction()
function, becauseCurPane()
will return it in the moment the current pane changes to a pane other than aBufPane
.Fixes #2288 Fixes #2307