aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/search.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/vcomponent/search.scm')
-rw-r--r--module/vcomponent/search.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm
index 65e2630a..708f0895 100644
--- a/module/vcomponent/search.scm
+++ b/module/vcomponent/search.scm
@@ -5,6 +5,7 @@
:use-module (srfi srfi-9)
:use-module (srfi srfi-41)
:use-module (srfi srfi-41 util)
+ :use-module (srfi srfi-111)
)
@@ -52,12 +53,15 @@
;; stream-force needs to happen within the actual
;; @var{call-with-time-limit}.
(lambda ()
- (let loop ((strm (stream-ref query page)))
+ (let loop ((strm (unbox (stream-ref query page))))
(if (stream-null? strm) lst
(set! lst (cons (stream-car strm) lst))
(loop (stream-cdr strm)))))
(lambda _ (format (current-error-port) "~a~%" 'timed-out)))
- (reverse lst)))
+ (let ((list (reverse lst)))
+ (set-box! (stream-ref query page)
+ (list->stream list))
+ list)))
;; Creates a prepared query wrappend in a paginator.