commit 18bdde4aa45665148443f06bd590656cc727a230
parent 0cc3da5d5e90ca1ee02571d1ec5759c6bb4a1f3f
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 16 May 2016 13:12:33 +0200
search: when looking for whole words, examine the entire line
This fixes https://savannah.gnu.org/bugs/?47933.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -324,6 +324,11 @@ int findnextstr(
if (is_separate_word(found - fileptr->data, found_len,
fileptr->data))
break;
+ else {
+ /* Maybe there is a whole word in the rest of the line. */
+ rev_start = found + 1;
+ continue;
+ }
} else
#endif
break;