ui.tools.listener: better future-proofing with code-completion class.

clean-macosx-x86-64
John Benediktsson 2019-11-07 09:57:21 -08:00
parent 6db0ae3087
commit 69849bc925
1 changed files with 5 additions and 4 deletions

View File

@ -35,8 +35,9 @@ SINGLETONS: vocab-completion color-completion char-completion
path-completion history-completion ;
UNION: definition-completion word-completion
vocab-word-completion vocab-completion ;
UNION: listener-completion definition-completion
color-completion char-completion path-completion history-completion ;
UNION: code-completion definition-completion
color-completion char-completion path-completion ;
UNION: listener-completion code-completion history-completion ;
GENERIC: completion-quot ( interactor completion-mode -- quot )
@ -200,9 +201,9 @@ M: completion-popup handle-gesture ( gesture completion -- ? )
: ?check-popup ( interactor -- interactor )
dup popup>> [
gadget-child dup completion-popup? [
completion-mode>> dup history-completion? [ drop ] [
completion-mode>> dup code-completion? [
over completion-mode =
[ dup popup>> hide-glass ] unless
] if
] [ drop ] if
] [ drop ] if
] when* ;