Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Example string that is now trimmed away: `(java.lang.Long is in module java.base of loader 'bootstrap'; clojure.lang.IObj is in unnamed module of loader 'app')`
- [#3522](https://github.com/clojure-emacs/cider/issues/3522): Introduce a new possible value for [`cider-use-overlays`](https://docs.cider.mx/cider/usage/code_evaluation.html#overlays): `errors-only`.
- If specified, only errors will result in an overlay being shown.
- [#3527](https://github.com/clojure-emacs/cider/issues/3527): Preserve the font size as one navigates through the CIDER inspector.

## 1.8.2 (2023-10-15)

Expand Down
10 changes: 7 additions & 3 deletions cider-inspector.el
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,10 @@ MAX-COLL-SIZE if non nil."
;; Render Inspector from Structured Values
(defun cider-inspector--render-value (value)
"Render VALUE."
(cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 'ancillary)
(cider-inspector-render cider-inspector-buffer value)
(let ((font-size (when-let ((b (get-buffer cider-inspector-buffer)))
(buffer-local-value 'text-scale-mode-amount b))))
(cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 'ancillary)
(cider-inspector-render cider-inspector-buffer value font-size))
(cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer)
(when cider-inspector-fill-frame (delete-other-windows))
(ignore-errors (cider-inspector-next-inspectable-object 1))
Expand All @@ -408,10 +410,12 @@ MAX-COLL-SIZE if non nil."
(when cider-inspector-page-location-stack
(goto-char (pop cider-inspector-page-location-stack))))))

(defun cider-inspector-render (buffer str)
(defun cider-inspector-render (buffer str &optional font-size)
"Render STR in BUFFER."
(with-current-buffer buffer
(cider-inspector-mode)
(when font-size
(text-scale-set font-size))
(let ((inhibit-read-only t))
(condition-case nil
(cider-inspector-render* (car (read-from-string str)))
Expand Down