Don't fail in magit-describe-item when item is nil.
This commit is contained in:
parent
864248a582
commit
7ad6d4dd55
1 changed files with 7 additions and 6 deletions
13
magit.el
13
magit.el
|
@ -1305,11 +1305,12 @@ Please see the manual for a complete description of Magit.
|
|||
(defun magit-describe-item ()
|
||||
(interactive)
|
||||
(let ((item (magit-get-item)))
|
||||
(message "Item: %s %s-%s %S"
|
||||
(magit-item-type item)
|
||||
(magit-item-beginning item)
|
||||
(magit-item-ending item)
|
||||
(magit-item-info item))))
|
||||
|
||||
(if item
|
||||
(message "Item: %s %s-%s %S"
|
||||
(magit-item-type item)
|
||||
(magit-item-beginning item)
|
||||
(magit-item-ending item)
|
||||
(magit-item-info item))
|
||||
(message "No item here"))))
|
||||
|
||||
(provide 'magit)
|
||||
|
|
Loading…
Reference in a new issue