Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, this PR fixes #1322. I also added comprehensive tests verifying we agree on the expected behavior.
I encountered this error a lot randomly from a flaky test during development:
I don't think this has anything to do with what I have done and wanted to bring this to your attention because I wasted many hours on this just to find it was just a flaky test :(. Or, maybe I just don't understand how the testing framework works. Either way, it was very difficult to know if I was introducing this error, because on re-run, it would go away!!! I think my tests are reasonable and don't do anything bad, but idk 🫠
It also happens randomly with 011:
But then, on re-run, it works for 10 straight reruns or more! I have tried numerous strategies to re-write and refactor my tests but I just don't know what I am doing wrong. My code works and I just wanted to show that with a test, but spent 10x more on the test than the fix.
feat(win_width): accept winid param
This helps ensure we are getting the expected window width.
test(handle_blame_info): verify right_align falls back to eol
fix(handle_blame_info): do not consider
wrap/nowrap
forright_align/eol
When calculating if a line should fall back to
eol
for very long lines,window wrapping should not be considered. This is because when window is
nowrap
, then the blame should still beeol
.The idea of
right_align
option is to be nicely right aligned, but fallback to
eol
when there is not enough room. Long lines withnowrap
willnever have extra room, so they should also always fall back to
eol
mode.