Skip to content
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 rendering of lines longer than 2^16 #4172

Merged
merged 4 commits into from
Oct 17, 2022
Merged

Commits on Oct 10, 2022

  1. Fix rendering of lines longer than 2^16

    Before things would be cast to u16 earlier than needed, which would
    cause problems for insanely long lines (longer than 2^16 ~ 65 thousand)
    A-Walrus committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    316bbe9 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Make skip_levels a u8

    A-Walrus committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    536c939 View commit details
    Browse the repository at this point in the history
  2. Only draw indent guides within bounds

    Better performance, and otherwise very long lines with lots of tabs
    will wrap around the u16 and come back on the other side, messing up
    the beginning skip_levels.
    A-Walrus committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    cc35d5a View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Replace in_bounds with calculation of end_indent

    Instead of repeatedly checking if it is in_bounds, calculate the
    max_indent beforehand and just loop. I added a debug_assert to "prove"
    that it never tries drawing out of bounds.
    A-Walrus committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    84edf8e View commit details
    Browse the repository at this point in the history