Menu

#535 stuttered page down doesn't work if lines are wrapped

Bug
closed-fixed
Scintilla (833)
3
2007-04-24
2007-02-19
Anonymous
No

The "stuttered page down" command doesn't work if the current page contains wrapped lines - on the first Page Down, the cursor will go to the bottom line on the page, and then it won't budge on subsequent Page Down keys.

The problem is that the calculation of the bottom stuttered line in Editor::PageMove() assumes that one display line equals one document line, which is wrong if there are any wrapped lines on the page. This is at line 4023 in Editor.cxx - changing the line as follows seems to fix it:

int bottomStutterLine =
pdoc->LineFromPosition(PositionFromLocation(
Point(lastXChosen, direction * vs.lineHeight * LinesToScroll())))
- caretYSlop - 1;

The idea here is that we calculate the bottom stuttered line as the actual document line at the bottom of the page. This takes into account the current wrapping situation, so it gets the right line.

Contact me at mjr_@hotmail.com with any questions.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2007-02-20
    • priority: 5 --> 3
    • assigned_to: nobody --> nyamatongwe
     
  • Neil Hodgson

    Neil Hodgson - 2007-02-20
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2007-02-20

    Logged In: YES
    user_id=12579
    Originator: NO

    Committed.

     
  • Neil Hodgson

    Neil Hodgson - 2007-04-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB