1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 542957: Scroll terminal number of lines indicated in wheel scroll event

The original code used the direction provided by the scroll wheel, but
not the magnitude.

Change-Id: I7f5e2083599990f4f4999aba46ef38602b9fe565
This commit is contained in:
Jonah Graham 2020-05-01 12:21:02 -04:00
parent cef0a80f91
commit f294b6583b

View file

@ -32,9 +32,7 @@ abstract public class GridCanvas extends VirtualCanvas {
super(parent, style);
addListener(SWT.MouseWheel, event -> {
if (getVerticalBar().isVisible()) {
int delta = -fCellHeight;
if (event.count < 0)
delta = -delta;
int delta = -fCellHeight * event.count;
scrollYDelta(delta);
}
event.doit = false;