1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2018-10-30 19:05:51 +01:00
родитель 5be94a3bbe
Коммит 9e2a12b62a

Просмотреть файл

@ -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;