When I place cursor after special variable containing bit-vector, slime tries to display it whole in minibuffer, which is slow and if size of vector is very large it may crash slime:
(defparameter *foo* (make-array 20000000 :element-type 'bit)) *FOO*
On 8/22/08, Stas Boukarev stassats@gmail.com wrote:
When I place cursor after special variable containing bit-vector, slime tries to display it whole in minibuffer, which is slow and if size of vector is very large it may crash slime:
(defparameter *foo* (make-array 20000000 :element-type 'bit)) *FOO*
The following patch should fix the problem. It's also possible to have long symbols, but i think it's very uncommon.
Index: swank-arglists.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/contrib/swank-arglists.lisp,v retrieving revision 1.21 diff -r1.21 swank-arglists.lisp 479,481c479,489 < (let ((*print-pretty* nil) (*print-level* 4) < (*print-length* 10) (*print-circle* t)) < (format nil "~A => ~A" sym (symbol-value sym))))))) ---
(let ((*print-pretty* nil) (*print-level* 4) (*print-length* 10) (*print-circle* t) (value (symbol-value sym))) (cond ((and (or (bit-vector-p value) (stringp value)) (> (length value) *print-length*)) (format nil "~A => ~A..." sym (subseq value 0 *print-length*))) ((and (integerp value) (> value most-positive-fixnum)) (format nil "~A => ~F" sym value)) (t (format nil "~A => ~A" sym value))))))))
* Stas Boukarev [2008-08-23 07:15+0200] writes:
On 8/22/08, Stas Boukarev stassats@gmail.com wrote:
When I place cursor after special variable containing bit-vector, slime tries to display it whole in minibuffer, which is slow and if size of vector is very large it may crash slime:
(defparameter *foo* (make-array 20000000 :element-type 'bit)) *FOO*
The following patch should fix the problem. It's also possible to have long symbols, but i think it's very uncommon.
I committed something similar which truncates the output if it takes more than one line or 75 characters.
Helmut.