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

    magit-find-file--restore-position: Remove unnecessary check
    
    `line' is always non-nil.
---
 lisp/magit-files.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index 50f069af9a..69552bb772 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -188,12 +188,11 @@ REV is a revision or one of \"{worktree}\" or 
\"{index}\"."
          (setq line (magit-diff-visit--offset
                      file (concat rev-oid ".." rev) line)))
         ((setq line (magit-diff-visit--offset file (list "-R" rev) line)))))
-    (when line
-      (with-current-buffer buf
-        (widen)
-        (goto-char (point-min))
-        (forward-line (1- line))
-        (move-to-column col)))))
+    (with-current-buffer buf
+      (widen)
+      (goto-char (point-min))
+      (forward-line (1- line))
+      (move-to-column col))))
 
 (define-advice lsp (:around (fn &rest args) magit-find-file)
   "Do nothing when visiting blob using `magit-find-file' and similar.

Reply via email to