branch: elpa/cider
commit d8830f40fc2c1ae270dbad26cb807e8be1633195
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Fix a nil crash in the REPL truncated-output handler
The `:on-truncated' handler passed nil to `cider-repl-emit-stderr', which
propertizes it and errors with `wrong-type-argument stringp nil' - so a
result flagged truncated by the print middleware would blow up instead of
being reported. Emit an actual truncation notice, as the interactive-eval
path already does.
---
lisp/cider-repl.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/cider-repl.el b/lisp/cider-repl.el
index 0cd8a2c4d7..255762e607 100644
--- a/lisp/cider-repl.el
+++ b/lisp/cider-repl.el
@@ -1354,9 +1354,7 @@ REPL BUFFER rather than popping to the inspector (#3636)."
(setq show-prompt (funcall handler content-type
buffer value nil t))
(cider-repl-emit-result buffer value t t)))
:on-truncated (lambda ()
- ;; Preserve the (incidentally nil) warning the legacy
- ;; truncated-handler form passed through.
- (cider-repl-emit-stderr buffer nil)))))
+ (cider-repl-emit-stderr buffer "\n... output truncated
...\n")))))
(defun cider--repl-request-plist ()
"Plist to be merged into REPL eval requests."