-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix indentation lines (#6134) #6136
Conversation
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.
Good catch, this particular mixup of tab width and indent width was missed in #5918.
Btw, there's something fishy with where the start of the indentation lines is calculated: As you can see, they are drawn over the line numbers and the line gutter... I can try to fix this in another PR, when I understand how starting_indent works EDIT: EDIT2: starting_indent: (col_offset + indent_width - 1) / indent_width
+ editor_config.indent_guides.skip_levels as usize, I could just push this change in this PR too to reduce the overhead of another PR |
Ah yeah the upwards rounding is the correct fix. This bug seems to exist eversibce indent guides were added but the reason it wasnt visible.before is that gutters were drawn after the text in the past so the additional indent guides were overwritten but since #5420 gutters are drawn as a gemric decrostions which get rendered on the fly just before the text on the same line is drawn SL.the existing bug is moticable now. It would be great if you fixed the rounding inside this commit. However a small.nit: foe upwards rounding integer division |
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.
Closes #6134.
This is my first contribution and I'm honestly surprised at how quick I was able to implement the fix.
Criticism is welcome - I don't know what I'm doing xD