Fix syntax theme previews to use normal option initialization - #2230
Open
pederbe wants to merge 1 commit into
Open
Fix syntax theme previews to use normal option initialization#2230pederbe wants to merge 1 commit into
pederbe wants to merge 1 commit into
Conversation
pederbe
marked this pull request as ready for review
September 6, 2026 06:52
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.
Summary
--show-syntax-themesparsed command-line options directly, bypassing Git configuration, environment settings, and computed rendering options. Initialize preview options through the normal path so backgrounds, line filling, and empty-line markers match ordinary rendering with the selected syntax theme.Add ANSI-output comparisons for dark and light themes, true-color modes, and a Git-config feature with environment-based color detection.
Fixes #2175.
Testing
cargo test --locked: 416 passed, 1 failed, 8 ignored. The Windows path-separator failure insubcommands::external::test::subcommand_rgalso reproduces on unchanged upstream HEAD.cargo clippy --locked --all-targetsandcargo fmt -- --checkpass. Clippy reports warnings outside the changed code.cargo build --locked --releasepasses. Command-line checks confirm matching ANSI output for dark/light themes, both theme groups without an explicit mode, and a custom config; the built-in sample also renders successfully.CFLAGS=-g0to avoid a MinGW 8.1 debug-information compiler crash.make teststops at the raw-output/history comparison because binary-file notices are omitted. The same failure reproduces with unchanged upstream source. The other two shell scripts were run separately.