summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshell-fringe-status.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/eshell-fringe-status.el b/eshell-fringe-status.el
index 5cde3a8..3d9e71a 100644
--- a/eshell-fringe-status.el
+++ b/eshell-fringe-status.el
@@ -90,14 +90,15 @@ disabling the mode."
This indication is shown as a bitmap in the left fringe of the
window."
- (save-excursion
- (beginning-of-line)
- (insert
- (propertize " " 'display
- `((left-fringe efs--arrow-bitmap
- ,(if (zerop eshell-last-command-status)
- 'eshell-fringe-status-success
- 'eshell-fringe-status-failure)))))))
+ (when eshell-last-command-name
+ (save-excursion
+ (beginning-of-line)
+ (let ((face (if (zerop eshell-last-command-status)
+ 'eshell-fringe-status-success
+ 'eshell-fringe-status-failure)))
+ (insert
+ (propertize " " 'display
+ `((left-fringe efs--arrow-bitmap ,face))))))))
;;;###autoload
(define-minor-mode eshell-fringe-status-mode