Repository navigation
Conversation
Lets users keep hyperlinks on commit hashes and file paths while rendering the line-number column as plain text. Defaults to true so existing setups keep the current behavior. Closes dandavison#2264
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.
Summary
Adds a
--hyperlinks-line-numbers=true|falseoption (defaulttrue) so the line-number column can be rendered as plain text while keeping OSC8 hyperlinks on commit hashes, file paths and hunk headers.Motivation
Closes #2264. With
--hyperlinksenabled, every number in the line-number gutter becomes a hyperlink, which some terminals/OSes open on a single click, making the gutter effectively unusable for people who only want clickable file/commit links. This gives those users an opt-out scoped to line numbers only, without giving up hyperlinks entirely.Changes
--hyperlinks-line-numbersstring option ("true|false", default"true"), following the existing--inspect-raw-linespatternformat_line_number) now requires bothhyperlinksandhyperlinks-line-numbers--show-configoutputTests
test_hyperlinks_in_line_number_column: gutter rows contain an OSC8 file hyperlink with--line-numbers --hyperlinkstest_hyperlinks_line_numbers_disabled_leaves_gutter_plain: with--hyperlinks-line-numbers falseno gutter row contains an OSC8 hyperlink, while hunk headers keep theirsFull test suite: 478 passed, 0 failed.