emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/diff-hl ae810ec 1/2: diff-hl-diff-skip-to: Coexist with


From: ELPA Syncer
Subject: [elpa] externals/diff-hl ae810ec 1/2: diff-hl-diff-skip-to: Coexist with Davis Herring's patch to diff-mode
Date: Sat, 6 Nov 2021 19:57:20 -0400 (EDT)

branch: externals/diff-hl
commit ae810ec66ec0b4942ccca99b945b96e4785ebcaf
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    diff-hl-diff-skip-to: Coexist with Davis Herring's patch to diff-mode
    
    It's not in any branch of Emacs, but certain users have it applied
    locally. Prepase compatibility in advance (with Davis' patch, or any
    similar change).
---
 diff-hl.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/diff-hl.el b/diff-hl.el
index 9c43584..51a3c07 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -507,6 +507,7 @@ Only affects Git, it's the only backend that has staging 
area."
 (defun diff-hl-diff-skip-to (line)
   "In `diff-mode', skip to the hunk and line corresponding to LINE
 in the source file, or the last line of the hunk above it."
+  (goto-char (point-min)) ; Counteract any similar behavior in diff-mode.
   (diff-hunk-next)
   (let (found)
     (while (and (looking-at diff-hunk-header-re-unified) (not found))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]