nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 4953dcec20555bf71a237827f24d688c742ccfc3
parent f5155786e185f0ff53e6ea7b98810408c25abfa1
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue,  2 May 2017 10:29:36 +0200

tweaks: add another warning for an impossible condition

Diffstat:
Msrc/utils.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/utils.c b/src/utils.c @@ -237,9 +237,10 @@ 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) { - /* Just in case we search for an empty needle. :/ */ - if (*needle == '\0') + if (*needle == '\0') { + statusline(ALERT, "Searching for nothing -- please report a bug"); return (char *)start; + } if (ISSET(USE_REGEXP)) { if (ISSET(BACKWARDS_SEARCH)) {