commit 7a09b655c1f3726df18388fbebcb270bf4698b02
parent c8b26baee806ce2d7d523c4501020b26012edb82
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 13 Apr 2018 10:22:39 +0200
tweaks: rename a variable, for clarity
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -28,8 +28,8 @@
static bool came_full_circle = FALSE;
/* Have we reached the starting line again while searching? */
-static bool regexp_compiled = FALSE;
- /* Have we compiled any regular expressions? */
+static bool have_compiled_regexp = FALSE;
+ /* Whether we have compiled a regular expression for the search. */
/* Compile the given regular expression and store it in search_regexp.
* Return TRUE if the expression is valid, and FALSE otherwise. */
@@ -50,7 +50,7 @@ bool regexp_init(const char *regexp)
return FALSE;
}
- regexp_compiled = TRUE;
+ have_compiled_regexp = TRUE;
return TRUE;
}
@@ -70,9 +70,9 @@ void not_found_msg(const char *str)
* full screen refresh when the mark is on, in case the cursor has moved. */
void search_replace_abort(void)
{
- if (regexp_compiled) {
- regexp_compiled = FALSE;
+ if (have_compiled_regexp) {
regfree(&search_regexp);
+ have_compiled_regexp = FALSE;
}
#ifndef NANO_TINY
if (openfile->mark)