Skip to content

Calling diff-hl-show-hunk outside of a hunk results in interesting behavior #288

Description

@ermingol23

If you call diff-hl-show-hunk outside of an actual hunk (for instance by pressing C-x v *) and the file you are visiting is under version control and have at least one modification-hunk point is moved to a hunk but shows something else than what is expected in the popup.

Instead of the diff (expected result) you get a diff where the deleted part is a reference to a shared memory file. A constructed example below where xxxxxxxxx is user name, !path!to!repo!path!to!file is a made-up path (actual path uses ! instead of / as folder separator), and abcdef123456789abcdef123456789 is a made-up SHA:
--- /dev/shm/#!home!xxxxxxxxx!path!to!repo!path!to!file#.~abcdef123456789abcdef123456789~

The added part in turn is (where 'name-of-buffer' is a made-up buffer name):
+++ #<buffer name-of-buffer>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions