diff --git a/src/search.c b/src/search.c
index 8204d60741cad4714787fb6e9c0fd92e5193586a..5f0ce1670c2dd5ac502c558104c299b2cd6dcbd0 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;