}
#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)
{
/* 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. */
}
#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)) {
#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;
#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;
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;