Skip to content

Conversation

@ultronozm
Copy link

Add the command 'diff-hl-ediff-current-hunk', bound to 'C-x v e' in
'diff-hl-mode-map' and 'e' in the show-hunk UI, that uses Ediff to compare
against the reference revision, jumping to the hunk nearest point.

  • diff-hl.el (diff-hl--use-git-index-base-p): New helper function.
    (diff-hl-diff-against-reference, diff-hl-diff-buffer-with-reference): Use it.
    (diff-hl--ediff-reference-buffer): New helper function.
    (diff-hl-ediff-current-hunk): New command.
    (diff-hl-command-map): Bind 'e' to 'diff-hl-ediff-current-hunk'.
    (diff-hl-repeat-exceptions): Add 'diff-hl-ediff-current-hunk'.

  • diff-hl-show-hunk.el (diff-hl-show-hunk-ediff): New command.
    (diff-hl-show-hunk-map): Bind it to 'e'.

  • diff-hl-show-hunk-inline.el (diff-hl-show-hunk-inline): Update footer text to
    include Ediff keybinding.

  • diff-hl-show-hunk-posframe.el (diff-hl-show-hunk-posframe--header-line): Add
    Ediff button to the posframe header line.

Add the command 'diff-hl-ediff-current-hunk', bound to 'C-x v e' in
'diff-hl-mode-map' and 'e' in the show-hunk UI, that uses Ediff to compare
against the reference revision, jumping to the hunk nearest point.

* diff-hl.el (diff-hl--use-git-index-base-p): New helper function.
(diff-hl-diff-against-reference, diff-hl-diff-buffer-with-reference): Use it.
(diff-hl--ediff-reference-buffer): New helper function.
(diff-hl-ediff-current-hunk): New command.
(diff-hl-command-map): Bind 'e' to 'diff-hl-ediff-current-hunk'.
(diff-hl-repeat-exceptions): Add 'diff-hl-ediff-current-hunk'.

* diff-hl-show-hunk.el (diff-hl-show-hunk-ediff): New command.
(diff-hl-show-hunk-map): Bind it to 'e'.

* diff-hl-show-hunk-inline.el (diff-hl-show-hunk-inline): Update footer text to
include Ediff keybinding.

* diff-hl-show-hunk-posframe.el (diff-hl-show-hunk-posframe--header-line): Add
Ediff button to the posframe header line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant