From 18bdde4aa45665148443f06bd590656cc727a230 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@justemail.net> Date: Mon, 16 May 2016 13:12:33 +0200 Subject: [PATCH] search: when looking for whole words, examine the entire line This fixes https://savannah.gnu.org/bugs/?47933. --- src/search.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/search.c b/src/search.c index 8204d607..5f0ce167 100644 --- 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; -- GitLab