[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 1b97fe3155: Inspector: retain `truncate-lines` value
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/cider 1b97fe3155: Inspector: retain `truncate-lines` values across screens (#3579) |
|
Date: |
Mon, 13 Nov 2023 15:59:19 -0500 (EST) |
branch: elpa/cider
commit 1b97fe3155d2e22eb057b4269b42c3f6e4750a4e
Author: vemv <vemv@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Inspector: retain `truncate-lines` values across screens (#3579)
---
CHANGELOG.md | 1 +
cider-inspector.el | 20 ++++++++++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 028d41e9d7..770301bf05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
### Changes
- [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER
[Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java
class/method/field block tags (Returns/Throws/Params info) when available.
+- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html):
retain
[`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html)
values across screens.
## 1.11.1 (2023-11-11)
diff --git a/cider-inspector.el b/cider-inspector.el
index a040d934f4..066c37aae4 100644
--- a/cider-inspector.el
+++ b/cider-inspector.el
@@ -536,9 +536,19 @@ instead of just its \"value\" entry."
;; The font size is lost between inspector 'screens',
;; because on each re-rendering, we wipe everything,
including the mode.
;; Enabling cider-inspector-mode is the specific step
that loses the font size.
- (buffer-local-value variable b))))
+ (buffer-local-value variable b)))
+ (truncate-lines-defined (when-let* ((b (get-buffer
cider-inspector-buffer)))
+ (local-variable-p 'truncate-lines b)))
+ (truncate-lines-p (when-let* ((b (get-buffer cider-inspector-buffer))
+ (continue truncate-lines-defined))
+ (buffer-local-value 'truncate-lines b))))
(cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode
'ancillary)
- (cider-inspector-render cider-inspector-buffer value font-size fragments
block-tags))
+ (cider-inspector-render cider-inspector-buffer value
+ :font-size font-size
+ :truncate-lines-defined truncate-lines-defined
+ :truncate-lines-p truncate-lines-p
+ :fragments fragments
+ :block-tags block-tags))
(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))
@@ -557,12 +567,14 @@ instead of just its \"value\" entry."
(when cider-inspector-page-location-stack
(goto-char (pop cider-inspector-page-location-stack))))))
-(defun cider-inspector-render (buffer str &optional font-size fragments
block-tags)
+(cl-defun cider-inspector-render (buffer str &key font-size
truncate-lines-defined truncate-lines-p fragments block-tags)
"Render STR in BUFFER."
(with-current-buffer buffer
(cider-inspector-mode)
(when font-size
(text-scale-set font-size))
+ (when truncate-lines-defined
+ (setq-local truncate-lines truncate-lines-p))
(let ((inhibit-read-only t))
(condition-case nil
(cider-inspector-render* (car (read-from-string str))
@@ -574,7 +586,7 @@ instead of just its \"value\" entry."
(defvar cider-inspector-looking-at-java-p nil)
(defun cider-inspector-render* (elements &optional fragments block-tags)
- "Render ELEMENTS, and FRAGMENTS if present."
+ "Render ELEMENTS, and FRAGMENTS, BLOCK-TAGS if present."
(setq cider-inspector-looking-at-java-p nil)
(dolist (el elements)
(cider-inspector-render-el* el))
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/cider 1b97fe3155: Inspector: retain `truncate-lines` values across screens (#3579),
ELPA Syncer <=