Centering_width is erratic

Solved bugs are moved into this topic...
Post Reply
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Centering_width is erratic

Post by Stefan »

My goal: keep editor text in a center column, I don't want to read from far left to far right.

What I tried: combinations of "centering_width" and "margin". Wrap-mode set to 2.
centering.jpg
centering.jpg (11.13 KiB) Viewed 778 times
But it does not stick.
Sometimes it flushes the text to the left after I come back from fullscreen or distraction-free, sometimes it flushes left when switching tabs, sometimes when toggling side-panels, sometimes right upon start-up. When I restart Cuda, it might suddenly be ok. The same file.

Zooming in and out also seems to make it worse.
Switching to distraction-free also makes it worse.

What always solves the problem = Reopen the file. But I must close it first. A simple File Reopen is not enough.

An easier solution, in my opinion, were to offer left and right padding. In pixels, or percent. Easy to position the column. The way it's done in most editors.
Padding1.jpg
Padding1.jpg (4.59 KiB) Viewed 778 times
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post by main Alexey »

i cannot reproduce this. i set 2 "centering_......" options and worked a little (switching tabs, toggling fullscreen...).
can you give steps - how to see bug?
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post by main Alexey »

i can repro "flushing of text to the left" in one case yet - after I activate "2 horz" or another "not single" groups. BUT it's not a bug - it's by design, centering is only for 'single group'.
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post by Stefan »

I mailed you a short screen clip that recorded off my screen.

Sometimes it jumps back all the way to the left. Other times it does not happen until I open the file or start up Cuda. It is very erratic. And it does not always happen. Very erratic.
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post by Stefan »

I understand that it makes no sense on multiple groups, or split tabs. But when the split is OFF again, or the view is back to one group only, I would expect it to fall back to centered width.

What drives me nuts, is the randomness. It is unpredictable. I zoom, I switch views, and when I come back, it failed me again.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post by main Alexey »

i reworked the code for this option (2 options).
and added minor stuff.

1.185 (not released yet)

+ add: option "centering_width": reworked code, coz we had hard to reproduce bug when option was reset
+ add: option "centering_width" works also in grouping modes "2 horz", "3 horz", "4 horz", "6 horz"
+ add: option "centering_width" in floating groups: ignores grouping mode in main window
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post by Stefan »

Been working with the pre-release for a few hours, and so far, the centering_width has been consistent. Now they behave as expected, according to custom settings for Lexer and User. I think you nailed it! Thanks.
Post Reply