Menu

#2357 Truncation in Message::LineScroll

Bug
closed-fixed
5
2022-10-12
2022-09-29
Zufu Liu
No

Split from [feature-requests:#749], current code (in Editor::WndProc()) truncates spaceWidth before multiply:

case Message::LineScroll:
    ScrollTo(topLine + lParam);
    HorizontalScrollTo(xOffset + static_cast<int>(wParam) * static_cast<int>(vs.spaceWidth));
    return 1;

it seems better to use HorizontalScrollTo(xOffset + static_cast<int>(static_cast<int>(wParam) * vs.spaceWidth)); or use std::lround().

Related

Feature Requests: #749

Discussion

  • Neil Hodgson

    Neil Hodgson - 2022-09-30
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2022-09-30

    Committed as [bafddd].

     

    Related

    Commit: [bafddd]

  • Neil Hodgson

    Neil Hodgson - 2022-10-12
    • status: open-fixed --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2022-10-12

    Committed as [bafddd].

     

    Related

    Commit: [bafddd]


Log in to post a comment.

MongoDB Logo MongoDB