Repository navigation
Honor full and numeric reader widths while preserving defaults - #34
Merged
Merged
Conversation
narma
force-pushed
the
feat/full-width-reader
branch
from
October 8, 2026 19:48
56a8cf2 to
05af89a
Compare
|
👍 I've been loving I've tested your changes on my machine and it's working as desired. It would be great to see this merged. |
Owner
|
Thanks, this was a real bug, and your tests made it easy to review. Merging now. I'm adding a small change on top: one |
borghei
added a commit
that referenced
this pull request
Oct 23, 2026
…#37) * refactor(width): one Width type for --width, the config file and Args Replaces Args.width: Option<u16> plus Args.full_width: bool with Args.width: Width { Auto, Columns(n), Full }, shared by the CLI parser and the config file, and adds Default for Args so library callers can write Args { width, ..Default::default() } and stop breaking when fields are added. The config file now takes the --width keywords: width = "full", "wide" or "narrow" (previously only a number; strings were rejected). Credits @narma in the README for #34. * refactor(width): mark Width non_exhaustive
Merged
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.
On a wide terminal,
-w fulland numeric widths above 120 were still limited to 120 columns in the interactive reader.Honor explicit numeric widths up to the available document pane and let
-w fulluse the entire pane with two-column margins. Preserve the default 120-column reading width and existing plain output behavior. Update the CLI documentation and cover explicit widths, margins, narrow windows, the TOC pane, and plain output with regression tests, including an end-to-end PTY test.Validation:
env -u NO_COLOR TERM=xterm-256color cargo test --offline.cargo fmt --checkpassed.cargo clippy --offline -- -D warningspassed.AI assistance was used to prepare this change.