14 lines
304 B
Diff
14 lines
304 B
Diff
|
--- src/search.c
|
||
|
+++ src/search.c
|
||
|
@@ -805,8 +805,8 @@
|
||
|
char eol = eolbyte;
|
||
|
if (!exact)
|
||
|
{
|
||
|
- end = memchr (end, eol, buflim - end);
|
||
|
- end++;
|
||
|
+ if (!(end > buf && end[-1] == eol))
|
||
|
+ end = memchr (end, eol, buflim - end) + 1;
|
||
|
while (buf < beg && beg[-1] != eol)
|
||
|
--beg;
|
||
|
}
|