diff options
-rw-r--r-- | res/about/version.gmi | 1 | ||||
-rw-r--r-- | src/ui/lookupwidget.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/res/about/version.gmi b/res/about/version.gmi index 1afc90e6..fd848d00 100644 --- a/res/about/version.gmi +++ b/res/about/version.gmi | |||
@@ -21,6 +21,7 @@ | |||
21 | * Fixed timestamps of visited URLs. Your browsing history will be erased but can still be found in "visited.txt". | 21 | * Fixed timestamps of visited URLs. Your browsing history will be erased but can still be found in "visited.txt". |
22 | * Fixed issue where "heading" feed entries would turn unread after a while. | 22 | * Fixed issue where "heading" feed entries would turn unread after a while. |
23 | * Fixed duplicate U key for home row navigation. | 23 | * Fixed duplicate U key for home row navigation. |
24 | * Fixed an issue with Unicode characters in quick lookup search terms. | ||
24 | 25 | ||
25 | ## 1.0.3 | 26 | ## 1.0.3 |
26 | * Improved font glyph caching: only rasterize glyphs when drawing text, and retry after failure. This makes initial document layout faster and avoids issues with permanently lost glyphs. | 27 | * Improved font glyph caching: only rasterize glyphs when drawing text, and retry after failure. This makes initial document layout faster and avoids issues with permanently lost glyphs. |
diff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c index 1975610e..123ac6c4 100644 --- a/src/ui/lookupwidget.c +++ b/src/ui/lookupwidget.c | |||
@@ -324,12 +324,15 @@ static iThreadResult worker_LookupWidget_(iThread *thread) { | |||
324 | while (nextSplit_Rangecc(range_String(&d->pendingTerm), " ", &word)) { | 324 | while (nextSplit_Rangecc(range_String(&d->pendingTerm), " ", &word)) { |
325 | if (isEmpty_Range(&word)) continue; | 325 | if (isEmpty_Range(&word)) continue; |
326 | if (!isFirst) appendCStr_String(pattern, ".*"); | 326 | if (!isFirst) appendCStr_String(pattern, ".*"); |
327 | for (const char *ch = word.start; ch != word.end; ch++) { | 327 | const iString wordStr = { iBlockLiteral(word.start, |
328 | word.end - word.start, | ||
329 | word.end - word.start) }; | ||
330 | iConstForEach(String, ch, &wordStr) { | ||
328 | /* Escape regular expression characters. */ | 331 | /* Escape regular expression characters. */ |
329 | if (isSyntaxChar_RegExp(*ch)) { | 332 | if (isSyntaxChar_RegExp(ch.value)) { |
330 | appendChar_String(pattern, '\\'); | 333 | appendChar_String(pattern, '\\'); |
331 | } | 334 | } |
332 | appendChar_String(pattern, *ch); | 335 | appendChar_String(pattern, ch.value); |
333 | } | 336 | } |
334 | isFirst = iFalse; | 337 | isFirst = iFalse; |
335 | } | 338 | } |
@@ -337,7 +340,7 @@ static iThreadResult worker_LookupWidget_(iThread *thread) { | |||
337 | job->term = new_RegExp(cstr_String(pattern), caseInsensitive_RegExpOption); | 340 | job->term = new_RegExp(cstr_String(pattern), caseInsensitive_RegExpOption); |
338 | delete_String(pattern); | 341 | delete_String(pattern); |
339 | } | 342 | } |
340 | const size_t termLen = size_String(&d->pendingTerm); | 343 | const size_t termLen = length_String(&d->pendingTerm); /* characters */ |
341 | clear_String(&d->pendingTerm); | 344 | clear_String(&d->pendingTerm); |
342 | job->docs = d->pendingDocs; | 345 | job->docs = d->pendingDocs; |
343 | d->pendingDocs = NULL; | 346 | d->pendingDocs = NULL; |