ui.tools.listener: minor cleanup to completion stuff.

handle-patch-and-put
John Benediktsson 2018-08-01 21:08:43 -07:00
parent 62fd7e3bbd
commit dc25fe3688
2 changed files with 4 additions and 8 deletions

View File

@ -193,6 +193,6 @@ completion-popup H{
[ [ nip ] [ gesture>operation ] 2bi ] [ drop f ] if ;
M: completion-popup handle-gesture ( gesture completion -- ? )
2dup completion-gesture dup [
2dup completion-gesture [
[ nip hide-glass ] [ invoke-command ] 2bi* f
] [ 2drop call-next-method ] if ;
] [ drop call-next-method ] if* ;

View File

@ -46,6 +46,8 @@ M: interactor manifest>>
GENERIC: (word-at-caret) ( token completion-mode -- obj )
M: object (word-at-caret) 2drop f ;
M: vocab-completion (word-at-caret)
drop
[ dup vocab-exists? [ >vocab-link ] [ drop f ] if ]
@ -59,12 +61,6 @@ M: word-completion (word-at-caret)
M: vocab-word-completion (word-at-caret)
vocab-name>> lookup-word ;
M: char-completion (word-at-caret) 2drop f ;
M: path-completion (word-at-caret) 2drop f ;
M: color-completion (word-at-caret) 2drop f ;
: word-at-caret ( token interactor -- obj )
completion-mode (word-at-caret) ;