Skip to content

[Bug] Syntax highlighting breaks after discarding changes #2801

@FeBe95

Description

@FeBe95

Description

Steps to reproduce:

  1. Open any project/repository.
  2. Select "Local Changes" in left sidebar.
  3. Select any unstaged file.
  4. Discard some changed lines in the file preview (by clicking "Discard" or pressing the "Del" key).

Expected result:

  • Syntax highlighting stays intact when discarding changes.

Actual result:

  • Syntax highlighting breaks sometimes when discarding changes.
  • A view update is required to fix it (e.g. by pressing the "F5" key).

Screen recording

  1. Selected a change.
  2. Pressed the "Del" key to discard.
  3. Pressed the "Enter" key to confirm.
  4. Syntax highlighting stayed intact.
  5. Selected a second change.
  6. Pressed the "Del" key to discard.
  7. Pressed the "Enter" key to confirm.
  8. Syntax highlighting broke:
    • blue or in $oldScoreTeam1
    • missing string highlighting for "goals" and "goalsAgainst"
    • orange Minute in ->matchMinute
    • ...
  9. Pressing the "F5" key fixes it.
20260611-1059-27.8471093.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions