Fix crash on mouse scrolling between message parts
This commit is contained in:
parent
1455ad97a9
commit
8ad517ea92
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue