Skip to content

Commit

Permalink
magit-describe-section-briefly: Show content beginning if any
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Jan 3, 2021
1 parent adbffe5 commit 2145477
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lisp/magit-section.el
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ Sections at higher levels are hidden."
With a prefix argument show the section identity instead of the
section lineage. This command is intended for debugging purposes."
(interactive (list (magit-current-section) current-prefix-arg))
(let ((str (format "#<%s %S %S %s-%s>"
(let ((str (format "#<%s %S %S %s-%s%s>"
(eieio-object-class section)
(let ((val (oref section value)))
(cond ((stringp val)
Expand All @@ -796,6 +796,9 @@ section lineage. This command is intended for debugging purposes."
(apply #'vector (magit-section-lineage section)))
(when-let ((m (oref section start)))
(marker-position m))
(if-let ((m (oref section content)))
(format "[%s-]" (marker-position m))
"")
(when-let ((m (oref section end)))
(marker-position m)))))
(if (called-interactively-p 'any)
Expand Down

0 comments on commit 2145477

Please sign in to comment.