From: NeilBrown Date: Wed, 2 Dec 2015 09:28:39 +0000 (+1100) Subject: search: fix but with dot matching newlines. X-Git-Tag: lca2016~129 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=f33835fe155ab09ba93470aa05eb74f0b44468d6;p=edlib.git search: fix but with dot matching newlines. Also default to case-insensitive until I get that configurable. Signed-off-by: NeilBrown --- diff --git a/lib-search.c b/lib-search.c index 0a0789eb..26d3a287 100644 --- a/lib-search.c +++ b/lib-search.c @@ -27,7 +27,7 @@ DEF_CMD(text_search) if (!d) return -1; m = ci->mark; - rxl = rxl_parse(ci->str, NULL, 0); + rxl = rxl_parse(ci->str, NULL, 1); if (!rxl) return -1; st = rxl_prepare(rxl); diff --git a/rexel.c b/rexel.c index 88c4daaa..a1e7d471 100644 --- a/rexel.c +++ b/rexel.c @@ -392,7 +392,7 @@ int rxl_advance(struct match_state *st, wint_t ch, int flag, int restart) advance = 1; if ((ch == '\n' || ch == '\r' || ch == '\f') && !RXL_IS_DOTALL(st->rxl)) - advance = 0; + advance = -1; break; case REC_MATCH: /* cannot match more chars here */