3737
3838(defface cider-debug-code-overlay-face
3939 '((((class color ) (background light )) :background " grey80" )
40- (((class color ) (background dark )) :background " grey20 " ))
40+ (((class color ) (background dark )) :background " grey30 " ))
4141 " Face used to mark code being debugged."
4242 :group 'cider
4343 :package-version " 0.9.1" )
@@ -93,21 +93,27 @@ PROPS is a plist of properties and values to add to the overlay."
9393 (while props (overlay-put o (pop props) (pop props)))
9494 o))
9595
96- (defun cider--make-result-overlay (value type &optional where )
96+ (defun cider--make-result-overlay (value type &optional where &rest props )
9797 " Place an overlay displaying VALUE at the end of the line.
98- TYPE is passed to `cider--make-overlay' .
98+ TYPE and PROPS are passed to `cider--make-overlay' .
9999The overlay is placed from beginning to end of current line.
100100If WHERE is the symbol inline, instead, the overlay ends at point and VALUE
101101is displayed at point."
102- (cider--make-overlay
102+ (apply
103+ #'cider--make-overlay
103104 (line-beginning-position )
104105 (if (eq where 'inline ) (point ) (line-end-position ))
105106 'debug-result
106107 'after-string
107108 (propertize (concat (propertize " " 'cursor 1000 )
108109 cider-interactive-eval-result-prefix
109110 (format " %s " value))
110- 'face 'cider-result-overlay-face )))
111+ 'face 'cider-result-overlay-face )
112+ props))
113+
114+ (defconst cider--fringe-arrow-string
115+ #(" ." 0 1 (display (left-fringe right-triangle)))
116+ " Used as an overlay's before-string prop to place a fringe arrow." )
111117
112118(defun cider--debug-display-result-overlay (value )
113119 " Place an overlay at point displaying VALUE."
@@ -117,7 +123,8 @@ is displayed at point."
117123 (remove-overlays nil nil 'cider-type 'debug-result )
118124 (remove-overlays nil nil 'cider-type 'debug-code )
119125 ; ; Result
120- (cider--make-result-overlay value 'debug-result cider-debug-use-overlays)
126+ (cider--make-result-overlay value 'debug-result cider-debug-use-overlays
127+ 'before-string cider--fringe-arrow-string)
121128 ; ; Code
122129 (cider--make-overlay (save-excursion (forward-sexp -1 ) (point ))
123130 (point ) 'debug-code
0 commit comments