tweaks: drop a check for the needle (the search string) being empty

No one ever reported seeing this.  And even if the needle were empty,
this is not a problem: it will simply match right away.
This commit is contained in:
Benno Schulenberg 2018-10-30 19:05:51 +01:00
parent 5be94a3bbe
commit 9e2a12b62a
1 changed files with 0 additions and 7 deletions

View File

@ -266,13 +266,6 @@ bool is_separate_word(size_t position, size_t length, const char *buf)
const char *strstrwrapper(const char *haystack, const char *needle,
const char *start)
{
if (*needle == '\0') {
#ifndef NANO_TINY
statusline(ALERT, "Searching for nothing -- please report a bug");
#endif
return (char *)start;
}
if (ISSET(USE_REGEXP)) {
if (ISSET(BACKWARDS_SEARCH)) {
size_t last_find, ceiling, far_end;