branch: elpa/git-commit
commit 437dfe95e92a2619f73f66355bdcdad5a77545f4
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-current-blame-chunk: Don't error at eob
    
    Unless requested, and then gracefully.
---
 lisp/magit-blame.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index 83e44f1ff5..d26765b551 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -255,7 +255,10 @@ Also see option `magit-blame-styles'."
                                 (magit-blame-arguments))
                               "-L" line rev "--" file)
                              (goto-char (point-min))
-                             (car (magit-blame--parse-chunk type)))))
+                             (if (eobp)
+                                 (unless noerror
+                                   (error "Cannot get blame chunk at eob"))
+                               (car (magit-blame--parse-chunk type))))))
                    (noerror nil)
                    (t (error "Buffer does not visit a tracked file")))))))
 

Reply via email to