Skip to content

Commit

Permalink
Limit the maximum string size to be displayed in echo area
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed May 13, 2024
1 parent b421bbb commit 4d9b205
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cider-overlays.el
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ focused."
(cider--make-result-overlay font-value
:where point
:duration cider-eval-result-duration
:prepend-face (or overlay-face 'cider-result-overlay-face)))))
:prepend-face (or overlay-face 'cider-result-overlay-face))))
(max-message-width (* 10 (window-width))))
(when (> (string-width font-value) max-message-width)
(setq font-value (concat (substring font-value 0 (- max-message-width 3))
"...")))
(message
"%s"
(propertize (format "%s%s" cider-eval-result-prefix font-value)
Expand Down

0 comments on commit 4d9b205

Please sign in to comment.