- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 23.5k
CodeEdit: Add line number gutter minimum digits #112115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| For reference, and from what I can see, in terms of what other programs do: 
 Given that some scripts can genuinely be really brief and self-sustaining, a minimum width of  I also would not make this an editor setting, personally, unless there's severe demand for it, because it's far too niche. A property or theme item may be fine, however. | 
fe7ac97    to
    7031bab      
    Compare
  
    | 
 
 There may be some misunderstanding here. This PR adds a property to the  | 
| No misunderstanding. I am aware of what this PR does. I just think an editor setting is excessive. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected. I think this is a good usability improvement, not only when editing code, but also when switching between scripts.
That said, in complex projects, the majority of GDScript files are expected to be in the 100-999 line range. Therefore, I don't think we need to expose an editor setting for this. A lower value would save a tiny bit of horizontal space in projects that use lots of small scripts, but you'd reintroduce the issue with layout shifts on script change as soon as you even have one script with 100+ lines of code.
7031bab    to
    175d819      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am neutral on the actual property itself. I think it makes sense, but I've never seen it being suggested until now. I approve for the editor's usability.
The problem: When editing scripts, I often notice this kind of jump caused by line numbers.
This PR:
line_numbers_min_digitsproperty toCodeEdit. It defaults to 1 to be compatible with existing projects.text_editor/appearance/gutters/line_numbers_min_digitswhich defaults to 2.