aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msgviewer.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r--widgets/msgviewer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 93d3d89e..19a2380e 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -373,7 +373,7 @@ func (ps *PartSwitcher) MouseEvent(localX int, localY int, event tcell.Event) {
case tcell.WheelDown:
height := len(ps.parts)
y := ps.height - height
- if localY < y {
+ if localY < y && ps.parts[ps.selected].term != nil {
ps.parts[ps.selected].term.MouseEvent(localX, localY, event)
}
if ps.parts[ps.selected].term != nil {
@@ -386,7 +386,7 @@ func (ps *PartSwitcher) MouseEvent(localX int, localY int, event tcell.Event) {
case tcell.WheelUp:
height := len(ps.parts)
y := ps.height - height
- if localY < y {
+ if localY < y && ps.parts[ps.selected].term != nil {
ps.parts[ps.selected].term.MouseEvent(localX, localY, event)
}
if ps.parts[ps.selected].term != nil {