- auto-invoke code gc
- fix alien-callback/SEH bug on win32
- x11: scroll up/down wiggles caret
-- tab completion: add a USE: if necessary
-- cocoa: windows are not updated while resizing
+ ui:
--- /dev/null
+IN: temporary
+USING: gadgets-listener words arrays namespaces test kernel ;
+
+<listener-gadget> "listener" set
+
+"kernel" vocab 1array "listener" get set-listener-gadget-use
+
+[ "dup" ] [ \ dup "listener" get completion-string ] unit-test
+
+[ "USE: words word-name" ]
+[ \ word-name "listener" get completion-string ] unit-test
+
+[ ] [ "listener" get show-history ] unit-test
: show-history ( listener -- )
[ <history-gadget> ] keep show-minibuffer ;
+: completion-string ( word listener -- string )
+ >r dup word-name swap word-vocabulary dup vocab r>
+ listener-gadget-use memq?
+ [ drop ] [ [ "USE: " % % " " % % ] "" make ] if ;
+
: insert-completion ( completion -- )
- word-name find-listener listener-gadget-input user-input ;
+ find-listener [ completion-string ] keep
+ listener-gadget-input user-input ;
listener-gadget "toolbar" {
{ "Restart" T{ key-down f { C+ } "r" } [ start-listener ] }