aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index 182ee98..b162c45 100644
--- a/vis.c
+++ b/vis.c
@@ -1700,7 +1700,8 @@ Regex *vis_regex(Vis *vis, const char *pattern) {
Regex *regex = text_regex_new();
if (!regex)
return NULL;
- if (text_regex_compile(regex, pattern, REG_EXTENDED|REG_NEWLINE) != 0) {
+ int cflags = REG_EXTENDED|REG_NEWLINE|(REG_ICASE*vis->ignorecase);
+ if (text_regex_compile(regex, pattern, cflags) != 0) {
text_regex_free(regex);
return NULL;
}