Notepad2e icon indicating copy to clipboard operation
Notepad2e copied to clipboard

Disable ScrollYCaretPolicy in page-wise Edit Mode

Open ProgerXP opened this issue 4 years ago • 4 comments
trafficstars

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.

ProgerXP avatar Feb 24 '21 13:02 ProgerXP

Done.

cshnik avatar Mar 25 '21 03:03 cshnik

n2e_SelectionEditIsVisibleOnScreen()

What is this check for?

ProgerXP avatar Apr 01 '21 10:04 ProgerXP

n2e_SelectionEditIsVisibleOnScreen()

What is this check for?

n2e_SelectionEditIsVisibleOnScreen() will check if there are any visible entries (related to Edit mode) on current page.

  1. If there are visible entries on screen - skip scrolling as requested in this issue.
  2. 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:

  1. Start Edit mode
  2. Use mouse scrolling to scroll document until active entry get hidden and no other entries are visible (Edit mode is still active)
  3. Continue text input in Edit mode Expected behavior: user should see the part of the document he is working at.

cshnik avatar Apr 01 '21 16:04 cshnik

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:

  1. Detection of to-be edited regions is invalid because there is a gap between the line with the caret and others
  2. 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.


a

ProgerXP avatar Oct 28 '21 18:10 ProgerXP

Fixed initialization of regions (bug since 2013 - #18).

cshnik avatar Aug 24 '22 19:08 cshnik

Disabled automatic document scrolling when working in page-wise edit mode,

cshnik avatar Sep 07 '22 16:09 cshnik