Merge: handle vc-display-status being nil

This commit is contained in:
Jessie Hildebrandt 2023-12-09 03:13:27 -05:00
commit 5dfc7572dd

View File

@ -49,8 +49,11 @@
(defun mood-line-segment-vc--rev (vc-mode-str backend)
"Return name of current file's revision for BACKEND according to `vc-mode'.
VC-MODE-STR is expected to be the value of `vc-mode' in the current buffer."
(or (pcase backend
VC-MODE-STR is expected to be the value of `vc-mode' in the current buffer.
If `vc-display-status' is nil, return the name of BACKEND."
(or (unless vc-display-status
(symbol-name backend))
(pcase backend
('Git (substring-no-properties vc-mode-str 5))
('Hg (substring-no-properties vc-mode-str 4)))
(ignore-errors