ui.tools.listener: handle history-completion popup differently.

clean-macosx-x86-64
John Benediktsson 2019-11-06 12:16:19 -08:00
parent aaabe0a142
commit 17aa52f51c
2 changed files with 10 additions and 8 deletions

View File

@ -196,3 +196,13 @@ M: completion-popup handle-gesture ( gesture completion -- ? )
2dup completion-gesture [
[ nip hide-glass ] [ invoke-command ] 2bi* f
] [ drop call-next-method ] if* ;
: ?check-popup ( interactor -- interactor )
dup popup>> [
gadget-child dup completion-popup? [
completion-mode>> dup history-completion? [ drop ] [
over completion-mode =
[ dup popup>> hide-glass ] unless
] if
] [ drop ] if
] when* ;

View File

@ -373,14 +373,6 @@ M: interactor stream-read-quot ( stream -- quot/f )
[ nip ] [ gesture>operation ] 2bi
[ invoke-command f ] [ drop t ] if* ;
: ?check-popup ( interactor -- interactor )
dup popup>> [
gadget-child dup completion-popup? [
completion-mode>> over completion-mode =
[ dup popup>> hide-glass ] unless
] [ drop ] if
] when* ;
M: interactor handle-gesture
{
{ [ over key-gesture? not ] [ call-next-method ] }