Runestone icon indicating copy to clipboard operation
Runestone copied to clipboard

Minimum Gutter Width Option

Open zachgibson opened this issue 3 years ago • 2 comments

It'd be great to have an option on gutter layout to specify a minimum width. Specifically to solve the text view "jumping" when hitting double (or more) digits. This would be especially nice if code is less than 3 digits.

repro

zachgibson avatar Jul 04 '22 16:07 zachgibson

@zachgibson This sounds like a good idea. Would it make sense to have the minimum width specified in terms of a minimum amount of characters that the gutter should accompany rather than a pixel width? That way the minimum width can be set to contain, for example, three characters, and as such, the width won't change until the file reaches line 1000.

It's difficult coming up with a great name for the property holding this setting but I'm thinking of something along the liens of this:

textView.minimumGutterWidthCharacterCount = 3

simonbs avatar Jul 05 '22 07:07 simonbs

Yeah I think that would work for majority of use-cases. Is there a reason you might not want to just expose the full frame dimensions?

zachgibson avatar Jul 05 '22 16:07 zachgibson

Thanks @mmackh and @simonbs!

zachgibson avatar Feb 15 '23 16:02 zachgibson