37
37
38
38
(defface cider-debug-code-overlay-face
39
39
'((((class color ) (background light )) :background " grey80" )
40
- (((class color ) (background dark )) :background " grey20 " ))
40
+ (((class color ) (background dark )) :background " grey30 " ))
41
41
" Face used to mark code being debugged."
42
42
:group 'cider
43
43
:package-version " 0.9.1" )
@@ -93,21 +93,27 @@ PROPS is a plist of properties and values to add to the overlay."
93
93
(while props (overlay-put o (pop props) (pop props)))
94
94
o))
95
95
96
- (defun cider--make-result-overlay (value type &optional where )
96
+ (defun cider--make-result-overlay (value type &optional where &rest props )
97
97
" 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' .
99
99
The overlay is placed from beginning to end of current line.
100
100
If WHERE is the symbol inline, instead, the overlay ends at point and VALUE
101
101
is displayed at point."
102
- (cider--make-overlay
102
+ (apply
103
+ #'cider--make-overlay
103
104
(line-beginning-position )
104
105
(if (eq where 'inline ) (point ) (line-end-position ))
105
106
'debug-result
106
107
'after-string
107
108
(propertize (concat (propertize " " 'cursor 1000 )
108
109
cider-interactive-eval-result-prefix
109
110
(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." )
111
117
112
118
(defun cider--debug-display-result-overlay (value )
113
119
" Place an overlay at point displaying VALUE."
@@ -117,7 +123,8 @@ is displayed at point."
117
123
(remove-overlays nil nil 'cider-type 'debug-result )
118
124
(remove-overlays nil nil 'cider-type 'debug-code )
119
125
; ; 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)
121
128
; ; Code
122
129
(cider--make-overlay (save-excursion (forward-sexp -1 ) (point ))
123
130
(point ) 'debug-code
0 commit comments