ui.tools.listener.completion: make sure "IN:<Ctrl-h>" works.

db4
John Benediktsson 2012-08-13 15:16:16 -07:00
parent 17bd952e4a
commit 7b2b3f5e9f
2 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,9 @@ IN: ui.tools.listener.completion.tests
[ t ] [ { "USE:" "A" } complete-vocab? ] unit-test
[ t ] [ { "USE:" } complete-vocab? ] unit-test
[ t ] [ { "USE:" "" } complete-vocab? ] unit-test
[ f ] [ { "USE:" } complete-vocab? ] unit-test
[ t ] [ { "UNUSE:" "A" } complete-vocab? ] unit-test

View File

@ -83,8 +83,8 @@ M: vocab-completion row-color
dup last empty? [
harvest ?last (complete-vocab?)
] [
harvest 2 short tail*
[ f ] [ [ (complete-vocab?) ] any? ] if-empty
harvest dup length 1 >
[ 2 tail* ?first (complete-vocab?) ] [ drop f ] if
] if ;
: chop-; ( seq -- seq' )