From c009ec56f56275dbad7f8cb53adedd620f77e505 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 16 Nov 2005 13:57:21 +0000 Subject: [PATCH] breakage and comment fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/prompt.c | 6 ++++-- src/search.c | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/prompt.c b/src/prompt.c index 49a9e87a..e5c62df3 100644 --- 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 index 5fdc5767..0d6be99e 100644 --- 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;