ui.tools.listener: minor cleanup to completion stuff.
parent
62fd7e3bbd
commit
dc25fe3688
|
@ -193,6 +193,6 @@ completion-popup H{
|
||||||
[ [ nip ] [ gesture>operation ] 2bi ] [ drop f ] if ;
|
[ [ nip ] [ gesture>operation ] 2bi ] [ drop f ] if ;
|
||||||
|
|
||||||
M: completion-popup handle-gesture ( gesture completion -- ? )
|
M: completion-popup handle-gesture ( gesture completion -- ? )
|
||||||
2dup completion-gesture dup [
|
2dup completion-gesture [
|
||||||
[ nip hide-glass ] [ invoke-command ] 2bi* f
|
[ nip hide-glass ] [ invoke-command ] 2bi* f
|
||||||
] [ 2drop call-next-method ] if ;
|
] [ drop call-next-method ] if* ;
|
||||||
|
|
|
@ -46,6 +46,8 @@ M: interactor manifest>>
|
||||||
|
|
||||||
GENERIC: (word-at-caret) ( token completion-mode -- obj )
|
GENERIC: (word-at-caret) ( token completion-mode -- obj )
|
||||||
|
|
||||||
|
M: object (word-at-caret) 2drop f ;
|
||||||
|
|
||||||
M: vocab-completion (word-at-caret)
|
M: vocab-completion (word-at-caret)
|
||||||
drop
|
drop
|
||||||
[ dup vocab-exists? [ >vocab-link ] [ drop f ] if ]
|
[ 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)
|
M: vocab-word-completion (word-at-caret)
|
||||||
vocab-name>> lookup-word ;
|
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 )
|
: word-at-caret ( token interactor -- obj )
|
||||||
completion-mode (word-at-caret) ;
|
completion-mode (word-at-caret) ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue