       (q/fill 255))
     (q/text line 15 (+ 60 (* i 15))))
 
-  (doseq [[line i] (map vector (:file-list state) (range))
+  (doseq [[i line] (enumerate (filter-query (:file-query state) (:file-list state)))
           :let [visible (= line (:image-file state))]]
     (q/fill 0 0 0 192)
     (q/rect (- width 100) (* i 15) 100 15)

            :left 0
            :top 0
            :query ""
            :show-cards false
            :query-filter true
            :debug (atom nil)

  (q/fill 0 0 0 192)
  (q/rect 0 0 300 60)
  (q/fill 255)
  (q/text (str (select-keys state [:left :top :zoom :query :show-cards :query-filter :debug-offset :file-query])) 15 15)
  (q/text (str (round (q/current-frame-rate)) "/" (q/target-frame-rate)) 15 45)

  (doseq [[i line] (enumerate (deref (:debug-avail state)))
