example 'cl-repl': hack to scroll to end of output when showing query dialog

This commit is contained in:
pls.153 2023-11-25 13:03:54 +01:00
parent d420b9cfd6
commit 451771805b
4 changed files with 10 additions and 6 deletions

View file

@ -38,11 +38,12 @@
(qrun*
(unless (x:empty-string query)
(q> |text| ui:*query-text* (string-trim '(#\Newline) query)))
(q! |clear| ui:*query-input*)
(q> |text| ui:*query-input* " ") ; hack 1 (see 'QueryDialog.qml')
(wait-while-transition)
(push-dialog :query)
(q! |forceActiveFocus| ui:*query-input*)
(q! |showKeyboard| ui:*main* t) ; needed on recursive calls
(qsingle-shot 500 (lambda () (q! |clear| ui:*query-input*))) ; hack 2 (see 'QueryDialog.qml')
(wait-for-closed)
(qlater (lambda () (editor:ensure-focus :show)))
(q< |text| ui:*query-input*)))