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

    magit--refresh-buffer-set-positions: Move log special case up
---
 lisp/magit-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index a90b1dabe11..fb7d3a7f895 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1137,12 +1137,12 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
         (with-selected-window window
           (magit-section-goto-successor section line char)
           (cond
+           ((derived-mode-p 'magit-log-mode))
            ((or (not window-start)
                 (> window-start (point))))
            ((magit-section-equal ws-section (magit-section-at window-start))
             (set-window-start window window-start t))
-           ((not (derived-mode-p 'magit-log-mode))
-            (when-let ((pos (save-excursion
+           ((when-let ((pos (save-excursion
                               (and (magit-section-goto-successor--same
                                     ws-section ws-line 0)
                                    (point)))))

Reply via email to