Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-06

Who uses "caret past EOL"?

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

If you do, do you use it within the range of the "longest line" only?

That is, currently caret-past-eol additionally allows you to scroll up to over 1000 columns, even if you don't have any line that long. Do you use that scroll range?

Reply by email

Michael Van Canneyt
to Martin Frb
Martin Frb 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 ?

Michael.

Reply by email

Martin Frb
to Michael Van Canneyt
Michael Van Canneyt wrote 11 lines
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?

-----------
Background:
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.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40282

Reply by email

Michael Van Canneyt
to Martin Frb
Martin Frb wrote 41 lines
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? ----------- Background: 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.

+1, but as you say, use cases vary :-)

Michael.

Reply by email

Marc Weustink
to Martin Frb: Yes, it will. The question is how far should it allow by default? ----------- Background:…
Martin Frb wrote 6 lines
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?

I use it, it was the first thing I enabled when it was available in Lazarus. I seldom use my mouse for text navigation (to slow) but in cases where I like to put my caret on a place using the mouse, it is in the visible area of the screen.
When using keyboard navigation it can be outside that area.

Show quoted text 17 lines
> 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? ----------- Background: 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.

Thats fine with me. Having the scrollbar limited to the max(screenwidht+something, longest line) makes sense.

Marc

Reply by email