[mcclim-cvs] CVS mcclim

thenriksen thenriksen at common-lisp.net
Thu Feb 7 20:20:06 UTC 2008


Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv4973

Modified Files:
	input-editing.lisp 
Log Message:
Use `format-items' when displaying inline completions.

This makes it work better in the ESA minibuffer.


--- /project/mcclim/cvsroot/mcclim/input-editing.lisp	2008/02/04 19:15:35	1.73
+++ /project/mcclim/cvsroot/mcclim/input-editing.lisp	2008/02/07 20:20:04	1.74
@@ -641,19 +641,14 @@
   (with-input-editor-typeout (stream :erase t)
     (surrounding-output-with-border (stream :shape :drop-shadow :background +cornsilk1+)
       (surrounding-output-with-border (stream :shape :rectangle)
-        (let* ((possibility-count (length possibilities))
-               (row-length (sqrt possibility-count))
-               (ptype `(completion ,possibilities)))
-          (formatting-table (stream)
-            (loop until (null possibilities)
-                  do (formatting-row (stream)
-                       (loop for cell-index from 0 below row-length
-                             until (null possibilities)
-                             do (formatting-cell (stream)
-                                  (funcall possibility-printer
-                                           (pop possibilities)
-                                           ptype
-                                           stream)))))))))))
+        (let ((ptype `(completion ,possibilities)))
+          (format-items possibilities
+           :stream stream
+           :printer #'(lambda (possibility stream)
+                        (funcall possibility-printer
+                                 possibility
+                                 ptype
+                                 stream))))))))
 
 ;;; Helper returns gesture (or nil if gesture shouldn't be part of the input)
 ;;; and completion mode, if any.




More information about the Mcclim-cvs mailing list