X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/752cd08c659c7393bacbfe4305760f4ee58a8255..92980e9076469956e1e2cb94df97d0f8d873114a:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 50bfac2f18..10859100d6 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -467,8 +467,9 @@ void ScintillaWX::DoVScroll(int type, int pos) { ScrollTo(topLineNew); } - -void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown) { +void ScintillaWX::DoMouseWheel(int rotation, int delta, + int linesPerAction, int ctrlDown, + bool isPageScroll ) { int topLineNew = topLine; int lines; @@ -485,7 +486,10 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction, int lines = wheelRotation / delta; wheelRotation -= lines * delta; if (lines != 0) { - lines *= linesPerAction; + if (isPageScroll) + lines = lines * LinesOnScreen(); // lines is either +1 or -1 + else + lines *= linesPerAction; topLineNew -= lines; ScrollTo(topLineNew); }