nano

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

commit c009ec56f56275dbad7f8cb53adedd620f77e505
parent 5ab56eaa8d54ac8507fab7f8f0680a7e2bfa66a0
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Wed, 16 Nov 2005 13:57:21 +0000

breakage and comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/prompt.c | 6++++--
Msrc/search.c | 11++++++-----
2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/prompt.c b/src/prompt.c @@ -644,8 +644,6 @@ void do_statusbar_verbatim_input(bool *got_enter) } #ifndef NANO_TINY -/* Search for a match to one of the two characters in bracket_set. If - * reverse is TRUE, search backwards. Otherwise, search forwards. */ bool find_statusbar_bracket_match(bool reverse, const char *bracket_set) { @@ -672,6 +670,10 @@ bool find_statusbar_bracket_match(bool reverse, const char /* We've found a potential match. */ if (found != NULL) break; + + /* We've reached the start or end of the statusbar text, so + * get out. */ + return FALSE; } /* We've definitely found something. */ diff --git a/src/search.c b/src/search.c @@ -348,7 +348,8 @@ bool findnextstr( } #endif - /* Start or end of buffer reached, so wrap around. */ + /* We've reached the start or end of the buffer, so wrap + * around. */ if (fileptr == NULL) { #ifndef NANO_TINY if (ISSET(BACKWARDS_SEARCH)) { @@ -361,11 +362,10 @@ bool findnextstr( #ifndef NANO_TINY } #endif - statusbar(_("Search Wrapped")); } - /* Original start line reached. */ + /* We've reached the original starting line. */ if (fileptr == begin) search_last_line = TRUE; @@ -1060,7 +1060,8 @@ void do_gotopos(ssize_t line, size_t pos_x, ssize_t pos_y, size_t #ifndef NANO_TINY /* Search for a match to one of the two characters in bracket_set. If - * reverse is TRUE, search backwards. Otherwise, search forwards. */ + * reverse is TRUE, search backwards. Otherwise, search forwards. + * Return TRUE if we found a match, or FALSE otherwise. */ bool find_bracket_match(bool reverse, const char *bracket_set) { filestruct *fileptr = openfile->current; @@ -1097,7 +1098,7 @@ bool find_bracket_match(bool reverse, const char *bracket_set) current_y_find++; } - /* Start or end of buffer reached, so get out. */ + /* We've reached the start or end of the buffer, so get out. */ if (fileptr == NULL) return FALSE;