Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix git-grep match-highlighting at line-start #1057

Merged
merged 2 commits into from
Jul 16, 2022

Commits on Apr 26, 2022

  1. Fix git-grep match-highlighting at line-start

    This commit fixes highlighting the part of the line of code that matches
    the git grep query in cases where the match starts at the beginning of
    the lines.
    
    Fixes dandavison#1056.
    jdpopkin committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    875e22c View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. Fix handling of non-match highlight

    In some cases, `git grep` will customize the foreground-color for more
    than just the subset of the line that matches the grep pattern. This
    breaks the current match-detection behavior, which considers any
    characters with a non-default "foreground color" within the "code" part
    of a git-grep-ouput-line to be part of the match. This commit makes
    match-detection check for boldness and a red foreground instead of just
    checking for a non-default foreground-color.
    
    git grep matches are bold and red by default. But git grep isn't the
    only reason input to delta may contain color codes; there may still be
    cases where the highlighting looks wrong here.
    jdpopkin committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    2aa2c0c View commit details
    Browse the repository at this point in the history