summaryrefslogtreecommitdiff
path: root/src/ui/lookupwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-07 22:40:40 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-07 22:40:40 +0300
commit320791c629e988f4634590aadf1bee5ee53d1785 (patch)
tree3333ccc0e5fa160e116757b06e6e0f72d35ff063 /src/ui/lookupwidget.c
parent5e556c4ebbecd8979ee1d7088d98da121971a9ea (diff)
LookupWidget: Improved multi-word matches
All search terms must be found in order, but may have anything between them.
Diffstat (limited to 'src/ui/lookupwidget.c')
-rw-r--r--src/ui/lookupwidget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c
index 9951e406..5fcbaacd 100644
--- a/src/ui/lookupwidget.c
+++ b/src/ui/lookupwidget.c
@@ -246,7 +246,7 @@ static iThreadResult worker_LookupWidget_(iThread *thread) {
246 iBool isFirst = iTrue; 246 iBool isFirst = iTrue;
247 while (nextSplit_Rangecc(range_String(&d->pendingTerm), " ", &word)) { 247 while (nextSplit_Rangecc(range_String(&d->pendingTerm), " ", &word)) {
248 if (isEmpty_Range(&word)) continue; 248 if (isEmpty_Range(&word)) continue;
249 if (!isFirst) appendChar_String(pattern, '|'); 249 if (!isFirst) appendCStr_String(pattern, ".*");
250 for (const char *ch = word.start; ch != word.end; ch++) { 250 for (const char *ch = word.start; ch != word.end; ch++) {
251 /* Escape regular expression characters. */ 251 /* Escape regular expression characters. */
252 if (isSyntaxChar_RegExp(*ch)) { 252 if (isSyntaxChar_RegExp(*ch)) {