diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-16 17:02:33 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-16 17:02:33 +0100 |
| commit | 4b917c469bffdb8f390d126934a60c2bbebca7b4 (patch) | |
| tree | 8aa7ba8b8171acda314adef2b5830f3468607472 | |
| parent | c71fc4b12fcbf7bb9f5b764c7317d557b6278ec7 (diff) | |
limit search by bytes in search str instead of codepoints
| -rw-r--r-- | src/search.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search.cpp b/src/search.cpp index a455630..35e9a23 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -403,7 +403,7 @@ static void _ts_list_files(ts_search_result* result) void ts_start_search(utf8_int8_t *path, utf8_int8_t *filter, utf8_int8_t *query, uint16_t thread_count, uint32_t max_fs, bool case_sensitive) { - if (utf8len(query) > 0 && utf8len(query) <= 2) { // need a string of atleast 3 characters + if (strlen(query) > 0 && strlen(query) <= 2) { // need a string of atleast 3 bytes. so 3 regular characters or 1 chinese character. return; } |
