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

Stop highlighting unchanged whitespace #1659

Merged
merged 1 commit into from
Mar 17, 2024

Commits on Mar 17, 2024

  1. Stop highlighting unchanged whitespace

    Fix a regression introduced by feec45b (Fix warning highlight for
    trailing whitespace (dandavison#1037), 2023-05-17) where trailing space at the end
    of an unchanged token is highlighted if the token follows an insertion.
    This happens because when the token is split in two to separate trailing
    whitespace the two halves end up being tagged with different edit
    operations. This can be seen in the test changes in
    `test_infer_edits_14` and `test_infer_edits_16` introduced by feec45b
    which changed the operation from `PlusNoop` to `Insertion` when
    splitting trailing whitespace from unchanged tokens. Fix this by using
    the same operation when adding both halves of a split token and
    correcting the tests.
    
    Fixes dandavison#1658
    phillipwood committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    8319af2 View commit details
    Browse the repository at this point in the history