Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

Option to show end-of-lines marks only for wrapped lines #5505

Closed pintassilgo closed 2 weeks ago

pintassilgo commented 1 month ago

Cuda can display eol marks if user has e in unprinted_content, but it displays marks for every line.

I suggest to allow displaying marks only for wrapped lines.

Textadept, for instance, supports this feature. image

pintassilgo commented 1 month ago

It also allows user to define if mark should be fixed at the right side or next to last char. It would be good to be able to choose. I'd probably use next-to-last-char, as in the screenshot above.

Alexey-T commented 1 month ago

Maybe I will consider it, later (weeks/months).

Alexey-T commented 1 month ago

I don't know how much it is needed, probably not much and noone needs it. Only few users of Textadept...

pintassilgo commented 1 month ago

The big and popular Microsoft Visual Studio (from where the name "VSCode" came from) is another example of editor having this feature: image

I can clearly see the utility of this feature. When you're reading a line, when you reach right edge there's currently no way to know if the line ends there or if it was wrapped. You need to move your eyes left to check lines number bar.

Cuda has the feature to display wrap line indicator, but it comes with the unwanted indicator to all the other normal lines, for which I see no use for so I don't want to enable normal EOL indicator, it's a distraction, a bloat for me.

That's why I'm suggesting a way to display only wrap line indicator, without enabling normal end of line indicator. Just like the two screenshots I posted (Visual Studio and Textadept).

Alexey-T commented 1 month ago

It is good argument, thanks, accepted.

Alexey-T commented 2 weeks ago

Beta linux-x64-qt5 cudatext.xz.zip

New flag in "unprinted_content" is 'E' == 'show ONLY wrapped-parts marks'. it needs 'e' too. please test.

pintassilgo commented 2 weeks ago

Looks good to me, thanks!

A possible improvement is allowing user to set if the mark will be fixed at right edge or if it should be next to last char of the line (current).

I prefer the way it is now (next to last char), but some may like the other, as in the Visual Studio screenshot I posted above.

pintassilgo commented 2 weeks ago

offtopic: this mark follows which color theme ui item? I'd like to change its color.

Alexey-T commented 2 weeks ago

I prefer the way it is now (next to last char), but some may like the other, as in the Visual Studio screenshot I posted above.

Then maybe let's postpone it until the request.

this mark follows which color theme ui item?

'editor, unprinted chars, font'.

Alexey-T commented 2 weeks ago

Added (will be in next update):

pintassilgo commented 2 weeks ago

Thanks!