GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — diff: place -y gutter marker at the middle of the gutter by nagendramohan · Pull Request #277 · uutils/diffutils Conversation
Contributor
In side-by-side ( Pad from Fixes #269.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsIn side-by-side output the gutter marker was written wherever process_half_line stopped padding the left half (one column past sdiff_half_width), not at separator_pos (the middle of the gutter). Those agree only when the gutter is 3 or 4 columns wide, so the default --width=130 --tabsize=8 (gutter 3) looked right while other widths/tab sizes drifted (e.g. --width=40 placed '<' at column 17 instead of 19). Pad from half_width + 1 up to separator_pos before writing the marker so it lands at the gutter middle, matching GNU sdiff. format_tabs_and_spaces is a no-op when already at/past separator_pos, so narrow gutters are unaffected. Add a regression test at --width=40. Fixes uutils#269
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
sylvestre
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4 lines of comment for a one-liner, could you please make it shorter? :)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
sylvestre
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, please make it shorter
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
sylvestre
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please also add a test in tests/integration.rs with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Shortened both comments and added an integration test covering -y --width=40 in both --expand-tabs and the default (tab-path) modes, asserting the marker sits at the gutter middle.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
sylvestre
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you please also test with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsShorten the two long comments per review, and add an integration test in tests/integration.rs exercising `-y --width=40` in both the default (expand_tabs: false, tab-padding path) and --expand-tabs modes, asserting the gutter marker lands at the middle of the gutter.
sylvestre
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we just compare the whole stdout instead of this helper?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsPer review, assert the exact stdout for both --expand-tabs and the default tab path instead of a column helper, so the test also pins the exact tabs/spaces emitted. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. diff:-y draws the gutter marker at the wrong column unless the gutter is 3 or 4 columns wide
Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |