Skip to content

Commit

Permalink
Always scroll to top of search results
Browse files Browse the repository at this point in the history
  • Loading branch information
lehitoskin committed Dec 31, 2016
1 parent 9395071 commit a34c568
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions search-results.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,18 @@
(send (ivy-tag-tfield) set-field-background color-white)
(load-image img-path))]))
(close-input-port in))

; scroll back to the top of the window
(send txt scroll-to-position 0)


; collect garbage that we've made from generating
; the search results
(collect-garbage 'major)

(send prep-notification show #f)


; set the cursor position to the very beginning
(send txt set-position 0 'same #f #t)
; and scroll back to the top of the window
(send txt scroll-to-position 0)

; make sure the displayed images reflect any new searches
(send ecanvas refresh)
(send results-frame show #t)]))

0 comments on commit a34c568

Please sign in to comment.