From e938326eee9781d340ae3704a742d5e3bad95cb6 Mon Sep 17 00:00:00 2001 From: Evan Gates Date: Fri, 18 Sep 2020 12:05:27 -0700 Subject: Add ignorecase option Add a global ignorecase boolean option. When set add REG_ICASE to cflags when calling text_regex_compile(). --- sam.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 6909020..b1be53b 100644 --- a/sam.c +++ b/sam.c @@ -300,6 +300,7 @@ enum { OPTION_LOAD_METHOD, OPTION_CHANGE_256COLORS, OPTION_LAYOUT, + OPTION_IGNORECASE, }; static const OptionDef options[] = { @@ -388,6 +389,11 @@ static const OptionDef options[] = { VIS_OPTION_TYPE_STRING, VIS_HELP("Vertical or horizontal window layout") }, + [OPTION_IGNORECASE] = { + { "ignorecase", "ic" }, + VIS_OPTION_TYPE_BOOL, + VIS_HELP("Ignore case when searching") + }, }; bool sam_init(Vis *vis) { -- cgit v1.2.3