-
Notifications
You must be signed in to change notification settings - Fork 11
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: force tabs to fixed size #37
Conversation
90ecc5d
to
2007768
Compare
I ran CI in my repo and I believe I fixed the previous failure |
Thanks!
|
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.
Putting back in your queue for now.
One question, when would multiple newlines appear in a single line?.. A line, by definition, shouldn't contain multiple newlines, correct? |
The way I've tried implementing this doesn't actually care, so this will work out anyway if it does happen 👍🏻 |
I think I've got something that addresses feedback! Cleaning things up and then will push 👍🏻 |
db2e9bd
to
cb0232e
Compare
cb0232e
to
3a453f0
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.
Thanks for fixing this! I think there's just a few minor points.
I queued #46 for merge; you might have to rebase/update tests. |
000a234
to
9a0bfe4
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.
Looks good to me, just one nit!
e68fd27
to
4f66b1e
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.
@firestack sorry for the delay, I meant to do this myself but haven't had time: can you check cargo clippy
and cargo test
and make sure they pass on each of the commits in the stack individually? IIRC two of them should be squashed
@arxanas Just ran both(at every commit in the stack, I wish JJ run worked lol), and didn't get any failures.
I think it was handled in this? #37 (comment) |
…lines Update src/ui.rs Co-authored-by: Waleed Khan <me@waleedkhan.name>
test(ui): add `test_tabs_in_files`
4f66b1e
to
1b75518
Compare
This was the lint error I was talking about on the bottom of the stack:
I squashed together the bottom two commits to fix this. Thanks for implementing this! |
oh sorry! I swear I tried to find them😅! |
@firestack It's no trouble 😊. Can I interest you in This is my config for this project: $ git test run -c help # HACK
The test command alias "help" was not defined.
To create it, run: git config branchless.test.alias.help <command>
Or use the -x/--exec flag instead to run a test command without first creating an alias.
These are the currently-configured command aliases:
• branchless.test.alias.lint = "cargo clippy --workspace --all-targets -- -D warnings"
• branchless.test.alias.fmt-fix = "cargo +nightly fmt --all"
• branchless.test.alias.test = "cargo nextest run --workspace --no-fail-fast"
$ git test run -c lint 'stack()'
... which is how I checked for lint+test failures. (Ideally, GitHub would just be better at doing stacked PRs, or make it easier to run actions on each commit in a PR, and we'd have CI per commit and it would be surfaced in a useful manner.) |
This is a simple fix for #2 Rendering Tab Characters. I think this could be made smarter in the future (i.e., making the tab replacement characters configurable. Potentially getting the tab size from the terminal) but this fixes the immediate issue.
I added a stub of tests, but I'm not confident that I've done this correctly, so I figure we can chat about it.
I also noticed I could try doing this logic in
Viewport::draw_text
instead, but I wasn't sure if that'd be desired.Partially Addresses: #2