branch: elpa/magit
commit 8298fc430d8e2e481fd965cfb3f617da68ce0c59
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-jump-to-diffstat-or-diff: Move definition
---
 lisp/magit-diff.el | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index fb21f933a11..13c10eb7849 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1862,23 +1862,6 @@ the Magit-Status buffer for DIRECTORY."
               (throw 'found nil))))))
     (+ line offset)))
 
-;;;;; Movement
-
-(defun magit-jump-to-diffstat-or-diff ()
-  "Jump to the diffstat or diff.
-When point is on a file inside the diffstat section, then jump
-to the respective diff section, otherwise jump to the diffstat
-section or a child thereof."
-  (interactive)
-  (if-let ((section (magit-get-section
-                     (append (magit-section-case
-                               ([file diffstat] `((file . ,(oref it value))))
-                               (file `((file . ,(oref it value)) (diffstat)))
-                               (t '((diffstat))))
-                             (magit-section-ident magit-root-section)))))
-      (magit-section-goto section)
-    (user-error "No diffstat in this buffer")))
-
 ;;;; Scroll Commands
 
 (defun magit-diff-show-or-scroll-up ()
@@ -2033,6 +2016,21 @@ like 'magit-jump-to-diffstat-or-diff'."
        (recenter 0)))
     ((message (format "No diff sections found")))))
 
+(defun magit-jump-to-diffstat-or-diff ()
+  "Jump to the diffstat or diff.
+When point is on a file inside the diffstat section, then jump
+to the respective diff section, otherwise jump to the diffstat
+section or a child thereof."
+  (interactive)
+  (if-let ((section (magit-get-section
+                     (append (magit-section-case
+                               ([file diffstat] `((file . ,(oref it value))))
+                               (file `((file . ,(oref it value)) (diffstat)))
+                               (t '((diffstat))))
+                             (magit-section-ident magit-root-section)))))
+      (magit-section-goto section)
+    (user-error "No diffstat in this buffer")))
+
 ;;; Diff Mode
 
 (defvar-keymap magit-diff-mode-map

Reply via email to