Skip to content

Commit 4d9b205

Browse files
Limit the maximum string size to be displayed in echo area
1 parent b421bbb commit 4d9b205

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cider-overlays.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ focused."
316316
(cider--make-result-overlay font-value
317317
:where point
318318
:duration cider-eval-result-duration
319-
:prepend-face (or overlay-face 'cider-result-overlay-face)))))
319+
:prepend-face (or overlay-face 'cider-result-overlay-face))))
320+
(max-message-width (* 10 (window-width))))
321+
(when (> (string-width font-value) max-message-width)
322+
(setq font-value (concat (substring font-value 0 (- max-message-width 3))
323+
"...")))
320324
(message
321325
"%s"
322326
(propertize (format "%s%s" cider-eval-result-prefix font-value)

0 commit comments

Comments
 (0)