Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
c8b26bae
Commit
c8b26bae
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: elide a function that is called just once
Also adjust and correct a comment.
parent
bb394990
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/search.c
+6
-15
src/search.c
with
6 additions
and
15 deletions
+6
-15
src/search.c
View file @
c8b26bae
...
...
@@ -55,16 +55,6 @@ bool regexp_init(const char *regexp)
return
TRUE
;
}
/* Decompile the compiled regular expression we used in the last
* search, if any. */
void
regexp_cleanup
(
void
)
{
if
(
regexp_compiled
)
{
regexp_compiled
=
FALSE
;
regfree
(
&
search_regexp
);
}
}
/* Report on the status bar that the given string was not found. */
void
not_found_msg
(
const
char
*
str
)
{
...
...
@@ -76,17 +66,18 @@ void not_found_msg(const char *str)
free
(
disp
);
}
/* Abort the current search or replace. Clean up by displaying the main
* shortcut list, updating the screen if the mark was on before, and
* decompiling the compiled regular expression we used in the last
* search, if any. */
/* Free a compiled regular expression, if one was compiled; and schedule a
* 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
;
regfree
(
&
search_regexp
);
}
#ifndef NANO_TINY
if
(
openfile
->
mark
)
refresh_needed
=
TRUE
;
#endif
regexp_cleanup
();
}
/* Prepare the prompt and ask the user what to search for. Keep looping
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help