aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-27 19:16:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-27 19:16:57 +0000
commit064063fa4918fca4853d4c267f6316960bdb8e19 (patch)
treeb4cf594ab6fecc3fb1da8685181f027769f39820
parentsearch: sort includes (diff)
search: match case insensitive
-rw-r--r--search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c
index 17ac0cb8..d0740b02 100644
--- a/search.c
+++ b/search.c
@@ -75,7 +75,7 @@ search_update(struct terminal *term)
continue;
for (; start_col >= 0; start_col--) {
- if (row->cells[start_col].wc != term->search.buf[0])
+ if (wcsncasecmp(&row->cells[start_col].wc, term->search.buf, 1) != 0)
continue;
/*
@@ -90,7 +90,7 @@ search_update(struct terminal *term)
size_t match_len = 0;
for (size_t i = 0; i < term->search.len; i++, match_len++) {
- if (row->cells[end_col].wc != term->search.buf[i])
+ if (wcsncasecmp(&row->cells[end_col].wc, &term->search.buf[i], 1) != 0)
break;
if (++end_col >= term->cols) {