Repository navigation
pr: drop a tab that is wider than the page width - #16815
Open
seragAhmed wants to merge 1 commit into
Open
seragAhmed wants to merge 1 commit into
seragAhmed wants to merge 1 commit into
Conversation
Author
|
The failing jobs all stop at the same step, before any test runs: |
Like GNU pr, a tab wider than the column is dropped together with the rest of the line, and the line number is never cut. Enables test_page_width_narrower_than_leading_tab. Fixes uutils#16499
sylvestre
force-pushed
the
fix/16499-pr-drop-wide-char
branch
from
November 26, 2026 06:37
bc8b4c0 to
902a904
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #16499
With
-Wnarrower than a tab,prkept the tab and cut the line by character count, soprintf '\tone\n' | pr -t -W 5printed\toneinstead of an empty line.char_prefix_lennow stops at a tab that is wider than the column by itself, which drops it together with the rest of the line. The line number and its separator are always kept, so-n -W 5prints1\t. Other tabs still count as one character, so the merged-column output intest_with_mpris unchanged.This enables
test_pr::test_page_width_narrower_than_leading_tab(added in #16493). All 114test_prtests pass, andcargo fmtandclippy -D warningsare clean foruu_pr.