Notepad2e
Notepad2e copied to clipboard
Disable ScrollYCaretPolicy in page-wise Edit Mode
When inside Edit Mode that is affecting current page (screen), do not scroll the screen according to ScrollYCaretPolicy (#41) because it causes edit regions to shift and some of them become hidden.
Done.
n2e_SelectionEditIsVisibleOnScreen()
What is this check for?
n2e_SelectionEditIsVisibleOnScreen()
What is this check for?
n2e_SelectionEditIsVisibleOnScreen() will check if there are any visible entries (related to Edit mode) on current page.
- If there are visible entries on screen - skip scrolling as requested in this issue.
- If there are no visible entries - force document scrolling (as previously implemented) to show user his active selection.
Behavior in point 2 is useful in the following scenario:
- Start Edit mode
- Use mouse scrolling to scroll document until active entry get hidden and no other entries are visible (Edit mode is still active)
- Continue text input in Edit mode Expected behavior: user should see the part of the document he is working at.
Behavior in point 2 is useful in the following scenario:
It breaks Edit Mode: fill several screens with aa aa lines, scroll to top, Ctrl+Tab (with the caret near EOF) - you will find that:
- Detection of to-be edited regions is invalid because there is a gap between the line with the caret and others
- Even though the line with the caret has edit regions (including the initial edit region that you can modify), they are not highlighted
If fixing this is not easy then it's okay to remove scroll-if-invisible behaviour.

Fixed initialization of regions (bug since 2013 - #18).
Disabled automatic document scrolling when working in page-wise edit mode,