- Move the call to raw() on systems that don't define
_POSIX_VDISABLE outside the main input/output loop, as it
doesn't need to be called every time through the loop. (DLR)
+- search.c:
+ do_replace_loop()
+ - Fix segfault when doing a regex replace of a string that
+ matches inside a line (e.g. replace the "b" in "abc" with
+ anything). (David Benbennick)
- winio.c:
do_credits()
- Use nanosleep() instead of usleep(). The latter is only
#ifdef HAVE_REGEX_H
/* Set the bol_eol flag if we're doing a bol and/or eol regex
* replace ("^", "$", or "^$"). */
- if (ISSET(USE_REGEXP) && regexec(&search_regexp, prevanswer, 1, NULL, REG_NOTBOL | REG_NOTEOL) == REG_NOMATCH)
+ if (ISSET(USE_REGEXP) && regexec(&search_regexp, prevanswer, 0, NULL, REG_NOTBOL | REG_NOTEOL) == REG_NOMATCH)
bol_eol = 1;
#endif