commit 2f68bbb5e8c47b665b6d85b0f9f0573ed1c38faa
parent 55952c0984feeaa9d933079b6f70031091033a0f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 6 Apr 2019 20:08:39 +0200
tweaks: reword a comment, and drop an unneeded assert
Diffstat:
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -862,17 +862,14 @@ void do_gotolinecolumn_void(void)
}
#ifndef NANO_TINY
-/* Search for a match to one of the two characters in bracket_set. If
- * reverse is TRUE, search backwards for the leftmost bracket.
- * Otherwise, search forwards for the rightmost bracket. Return TRUE if
- * we found a match, and FALSE otherwise. */
+/* Search, startting from the current position, for any of the two characters
+ * in bracket_set. If reverse is TRUE, search backwards, otherwise forwards.
+ * Return TRUE when a match was found, and FALSE otherwise. */
bool find_bracket_match(bool reverse, const char *bracket_set)
{
linestruct *fileptr = openfile->current;
const char *rev_start = NULL, *found = NULL;
- assert(mbstrlen(bracket_set) == 2);
-
/* rev_start might end up 1 character before the start or after the
* end of the line. This won't be a problem because we'll skip over
* it below in that case, and rev_start will be properly set when