emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 53291c93e4: magit-describe-section-briefly: Acc


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 53291c93e4: magit-describe-section-briefly: Account for non-marker positions
Date: Thu, 30 Nov 2023 00:59:46 -0500 (EST)

branch: elpa/git-commit
commit 53291c93e487c789cb7273088a72a76566fc8ed8
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    magit-describe-section-briefly: Account for non-marker positions
    
    The `start', `end', and `content' slots may be set to plain positions
    as of 241b327b7 (Don't use markers in log buffers, 2023-08-05).
---
 lisp/magit-section.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 411ac34c08..39639bcfc7 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1110,12 +1110,13 @@ section lineage.  This command is intended for 
debugging purposes.
                          (magit-section-ident section)
                        (apply #'vector (magit-section-lineage section)))
                      (and-let* ((m (oref section start)))
-                       (marker-position m))
+                       (if (markerp m) (marker-position m) m))
                      (if-let ((m (oref section content)))
-                         (format "[%s-]" (marker-position m))
+                         (format "[%s-]"
+                                 (if (markerp m) (marker-position m) m))
                        "")
                      (and-let* ((m (oref section end)))
-                       (marker-position m)))))
+                       (if (markerp m) (marker-position m) m)))))
     (when interactive
       (message "%s" str))
     str))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]