aboutsummaryrefslogtreecommitdiff
path: root/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'search.c')
-rw-r--r--search.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/search.c b/search.c
index dda84e6d..5a2b6236 100644
--- a/search.c
+++ b/search.c
@@ -283,8 +283,13 @@ matches_cell(const struct terminal *term, const struct cell *cell, size_t search
if (composed == NULL && base == 0 && term->search.buf[search_ofs] == U' ')
return 1;
- if (c32ncasecmp(&base, &term->search.buf[search_ofs], 1) != 0)
- return -1;
+ if (hasc32upper(term->search.buf)) {
+ if (c32ncmp(&base, &term->search.buf[search_ofs], 1) != 0)
+ return -1;
+ } else {
+ if (c32ncasecmp(&base, &term->search.buf[search_ofs], 1) != 0)
+ return -1;
+ }
if (composed != NULL) {
if (search_ofs + composed->count > term->search.len)