From 64a090697a4ce072addd4f9ea6aadca5f6cd9a86 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Fri, 30 Sep 2022 09:31:14 +1000 Subject: Bug [#2357]. Make SCI_LINESCROLL more accurate when width of space not integer. --- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index e1dc99479..079095ae0 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -598,6 +598,10 @@ Enlarge point and point top indicators and scale to be larger with larger text.
  • + Make SCI_LINESCROLL more accurate when width of space not integer. + Bug #2357. +
  • +
  • On Win32 implement horizontal scrolling mouse wheel. Feature #1450.
  • diff --git a/src/Editor.cxx b/src/Editor.cxx index 32a63f14a..97c141bae 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6242,7 +6242,7 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { case Message::LineScroll: ScrollTo(topLine + lParam); - HorizontalScrollTo(xOffset + static_cast(wParam) * static_cast(vs.spaceWidth)); + HorizontalScrollTo(xOffset + static_cast(static_cast(wParam) * vs.spaceWidth)); return 1; case Message::SetXOffset: -- cgit v1.2.3