[Lazarus] Who uses "caret past EOL"?

Martin Frb lazarus at mfriebe.de
Fri Jun 2 15:21:04 CEST 2023

On 02/06/2023 15:07, Michael Van Canneyt via lazarus wrote:
> On Fri, 2 Jun 2023, Martin Frb via lazarus wrote:
>> If you do, do you use it within the range of the "longest line" only?
> What if I want to add a comment at column 60 (think explanation about
> enumerated value) but the max line length is 40 ?
> Now I click at col 60 and add the comment. Will this still be possible ?

Yes, it will.
The question is how far should it allow by default?

Currently the scroll always goes to 1024. Except when the longest line 
is longer, then it goes (on any line) to the max = longest line. But 
never behind that.

In future, if you hold cursor-right, it will go further (like notepad 
++, if "virtual space" is enabled).
Of course that covers the range for cursor keys.

About the range for mouse. The current limit is quite big. But if you 
really have lines that long => it's not enough.
So instead you will (optional) be able to scroll (scrollbar / mouse) up 
to "longest line" + "width of screen".
If your Window shows 85 chars, and your longest line is 20 chars, you 
can mouse move the caret up to 105 (and right cursor will go behind).

Those options are already there in the main branch:
- no extra scroll, just cursor keys  (well on shorter lines, the mouse 
can go up to "longest line", but that is placement, not scroll range)
- add one page to longest line
- Max(1024, longest line)

Currently the last is default.
Maybe "add one page" is a better default.
Unless, there are use cases that require to place the caret more than 
"one page" past the end of (the longest) line.

Since I don't use "caret past eol" at all, this is hard for me to judge. 
But my experience is, when ever I think there would be no such use case, 
there is at least one.

More information about the lazarus mailing list