models.search: Fix regression.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 13 Aug 2022 22:21:49 +0000 (17:21 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 13 Aug 2022 22:22:14 +0000 (17:22 -0500)
Fixes #2654

basis/models/search/search-tests.factor [new file with mode: 0644]
basis/models/search/search.factor

diff --git a/basis/models/search/search-tests.factor b/basis/models/search/search-tests.factor
new file mode 100644 (file)
index 0000000..beaf0ae
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2022 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: models models.search namespaces tools.test
+ui.gadgets.panes ui.gadgets.worlds ui.tools.button-list ;
+IN: models.search.tests
+
+{ } [
+    world-buttons <model> "Active Buttons"
+        <active-buttons-popup> gadget.
+] unit-test
\ No newline at end of file
index b2ce1efc53f07bc3b9e2811921f5332da4c701b5..40f017befdcb32ced244bbf185096985ac451ac4 100644 (file)
@@ -7,4 +7,4 @@ IN: models.search
     '[ _ curry filter ] <smart-arrow> ; inline
 
 : <string-search> ( values search quot -- model )
-    '[ @ [ >case-fold ] bi@ subseq-index? ] <search> ; inline
+    '[ swap @ [ >case-fold ] bi@ subseq? ] <search> ; inline