sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
271 stars 14 forks source link

Diff hunk 'function context labels' disappear when toggling whitespace #1763

Open 122800 opened 1 year ago

122800 commented 1 year ago

Version info

Description

The 'function context labels' for all diff hunks disappear when toggling "Show/Hide whitespace changes".

Steps to reproduce

Steps to reproduce the behavior:

  1. Open a repository with any commit or other diff that modifies code within a function block.
  2. See that the name of the function is displayed above the diff hunk.
  3. Toggle "Show/Hide whitespace changes".

Expected behavior

The labels remains visible.

Problematic behavior

All labels disappears. They can be restored by switching to a different commit and then back again.

Debug Information === App Version Information === Build: 2083

=== Git Version Information === Using Git: git (system) git version 2.40.1 PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

=== Browse Page Information === HEAD: ab2febc293db77a0a4c821e0be3625729a2dde9d Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0

=== Git Status Information === M test.java

=== Our Status Information === M test.java

=== Git Config Information === branch.dev.merge=refs/heads/dev branch.dev.remote=origin core.bare=false core.editor=subl -w core.filemode=true core.logallrefupdates=true core.repositoryformatversion=0

=== Our Config Information === Git Config Path Information Using config path: /etc/gitconfig Using config path: /home/username/.config/git/config Using config path: /home/username/.gitconfig Using config path: /home/username/kode/pro-ng/.git/config

Our config output is identical to the Git config output

=== Git Attributes Information === git check_attr --all output test.java

=== Our Modified Files Newline Normalisation and EOL Information === test.java: unspecified - native

=== Our Modified Files Flag Information === Ignoring symlinks: 0 test.java: Working - Normal File : Index - Normal File

Screenshots

See screencast.webm.

lkrms commented 7 months ago

I've also observed this behaviour on macOS, consistently since I can remember, although changing to a different commit and back again isn't enough to restore the labels for me. Saving the original file again is the only thing that reliably triggers re-parsing the document.