=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/pattern.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/less/pattern.c 2014/04/25 13:38:21 1.3 +++ src/usr.bin/less/pattern.c 2014/05/23 19:49:15 1.4 @@ -306,6 +306,11 @@ { regmatch_t rm; int flags = (notbol) ? REG_NOTBOL : 0; +#ifdef REG_STARTEND + flags |= REG_STARTEND; + rm.rm_so = 0; + rm.rm_eo = line_len; +#endif matched = !regexec(spattern, line, 1, &rm, flags); if (matched) {