=================================================================== RCS file: /cvs/mandoc/mansearch.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -p -r1.71 -r1.72 --- mandoc/mansearch.c 2017/04/18 13:57:56 1.71 +++ mandoc/mansearch.c 2017/04/18 15:06:49 1.72 @@ -1,4 +1,4 @@ -/* $OpenBSD: mansearch.c,v 1.71 2017/04/18 13:57:56 schwarze Exp $ */ +/* $OpenBSD: mansearch.c,v 1.72 2017/04/18 15:06:49 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013-2017 Ingo Schwarze @@ -672,6 +672,12 @@ exprterm(const struct mansearch *search, int argc, cha return e; } + if (strcmp("-i", argv[*argi]) == 0 && *argi + 1 < argc) { + cs = 0; + ++*argi; + } else + cs = 1; + e = mandoc_calloc(1, sizeof(*e)); e->type = EXPR_TERM; e->bits = 0; @@ -690,7 +696,6 @@ exprterm(const struct mansearch *search, int argc, cha * If needed, request regular expression handling. */ - cs = 1; if (search->argmode == ARG_WORD) { e->bits = TYPE_Nm; e->match.type = DBM_REGEX;