           (window-body-height test-window))
        ;; And minibuffer height.
        (window-height (minibuffer-window)))))
+
+(defun lusty-max-window-width ()
+  (frame-width))
 
 (defun lusty--setup-matches-window ()
   (let ((lowest-window (lusty-lowest-window))


(defun lusty--compute-optimal-layout (items)
  (let* ((max-visible-rows (1- (lusty-max-window-height)))
         (max-width (window-width))
         (upper-bound most-positive-fixnum)
         (n-items (length items))
         ; STEVE use pre-allocated array?

(defun* lusty--compute-optimal-layout-inner (lengths-v)
  (let ((n-items (length lengths-v))
        (max-visible-rows (1- (lusty-max-window-height)))
        (available-width (lusty-max-window-width))
        ; STEVE figure out optimal start :size
        ; STEVE use pre-allocated hash?
        (lengths-h (make-hash-table :test 'equal)))
