1
0
mirror of synced 2025-01-11 05:42:15 +01:00
paxcut 2cb4462274
impr: Better top margin handling for text editor. (#2021)
The top margin changes when popups block some portion on the screen.
Previously it was implemented adding blank lines at the bottom which
created problems if the windows was scrolled all the way to the bottom
and the popups were issued. The newer implementation doesn't use spaces
and simply resets the top of the window to be higher making the popup
interaction with the window more natural (no text disappears on the
lines the popup overlaps the text). changes can be identified form the
variables mTopMargin,mOldTopMargin and mNewTopMargin.

Unfortunately those changes revealed problems in cursor navigation that
needed to be addressed. Namely, the window will scroll up and down on
the line before last/second line at the top and similar problems for the
left and right. Those changes correspond to the function
EnsureCUrsorVisible()

Fixing those reveled yet more problems with scrolling past the end of
the file using the keyboard which required adding some more variables
and functions to support the correct handling, You find those changes in
the function MoveDown.

I also renamed some variables that had the wrong casing and fixed the
pasting but that is missing one line.
2024-12-23 10:35:53 +01:00
..