branch: elpa/magit
commit 88ed389dc740730af8c3b190a165d2efedc8b269
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-call-smerge: Remove unnecessary complication
Either way we end up inside the region smerge cares about
and that is all that matters here.
---
lisp/magit-apply.el | 4 +---
lisp/magit-diff.el | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 7728b27f6f4..30dafc2bc48 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -800,9 +800,7 @@ a separate commit. A typical workflow would be:
(defun magit-call-smerge (fn)
(pcase-let* ((file (magit-file-at-point t t))
(keep (get-file-buffer file))
- (`(,buf ,pos)
- (let ((magit-diff-visit-jump-to-change nil))
- (magit-diff-visit-file--noselect file))))
+ (`(,buf ,pos) (magit-diff-visit-file--noselect file)))
(with-current-buffer buf
(save-excursion
(save-restriction
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index f369d462f38..11df4d79ed6 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1823,14 +1823,12 @@ the Magit-Status buffer for DIRECTORY."
(not (equal (oref section value) '(chmod)))
section))))
-(defvar magit-diff-visit-jump-to-change t)
-
(defun magit-diff-hunk-line (section goto-from)
(save-excursion
(goto-char (line-beginning-position))
(with-slots (content combined from-ranges from-range to-range) section
(when (or from-range to-range)
- (when (and magit-diff-visit-jump-to-change (< (point) content))
+ (when (< (point) content)
(goto-char content)
(re-search-forward "^[-+]"))
(+ (car (if goto-from from-range to-range))