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
02d8da3b
Commit
02d8da3b
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a function, to be more fitting and descriptive
It is not an abort but simply a bit of cleaning up.
parent
7a09b655
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/proto.h
+1
-1
src/proto.h
src/search.c
+6
-6
src/search.c
src/text.c
+1
-1
src/text.c
with
8 additions
and
8 deletions
+8
-8
src/proto.h
View file @
02d8da3b
...
...
@@ -479,7 +479,7 @@ void do_rcfiles(void);
/* Most functions in search.c. */
void
not_found_msg
(
const
char
*
str
);
void
search_replace_abort
(
void
);
void
tidy_up_after_search
(
void
);
int
findnextstr
(
const
char
*
needle
,
bool
whole_word_only
,
int
modus
,
size_t
*
match_len
,
bool
skipone
,
const
filestruct
*
begin
,
size_t
begin_x
);
void
do_search
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/search.c
View file @
02d8da3b
...
...
@@ -68,7 +68,7 @@ void not_found_msg(const char *str)
/* 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
)
void
tidy_up_after_search
(
void
)
{
if
(
have_compiled_regexp
)
{
regfree
(
&
search_regexp
);
...
...
@@ -126,7 +126,7 @@ void search_init(bool replacing, bool keep_the_answer)
* nothing was searched for yet during this session, get out. */
if
(
i
==
-
1
||
(
i
==
-
2
&&
*
last_search
==
'\0'
))
{
statusbar
(
_
(
"Cancelled"
));
search_replace_abort
();
tidy_up_after_search
();
free
(
thedefault
);
return
;
}
...
...
@@ -146,7 +146,7 @@ void search_init(bool replacing, bool keep_the_answer)
/* If doing a regular-expression search, compile the
* search string, and get out when it's invalid. */
if
(
ISSET
(
USE_REGEXP
)
&&
!
regexp_init
(
last_search
))
{
search_replace_abort
();
tidy_up_after_search
();
return
;
}
...
...
@@ -155,7 +155,7 @@ void search_init(bool replacing, bool keep_the_answer)
else
go_looking
();
search_replace_abort
();
tidy_up_after_search
();
return
;
}
...
...
@@ -175,7 +175,7 @@ void search_init(bool replacing, bool keep_the_answer)
if
(
func
==
flip_goto
)
do_gotolinecolumn
(
openfile
->
current
->
lineno
,
openfile
->
placewewant
+
1
,
TRUE
,
TRUE
);
search_replace_abort
();
tidy_up_after_search
();
free
(
thedefault
);
return
;
}
...
...
@@ -393,7 +393,7 @@ void do_research(void)
go_looking
();
search_replace_abort
();
tidy_up_after_search
();
}
/* Search for the global string 'last_search'. Inform the user when
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
02d8da3b
...
...
@@ -2780,7 +2780,7 @@ const char *do_int_speller(const char *tempfile_name)
do_int_spell_fix
(
read_buff_word
);
free
(
read_buff
);
search_replace_abort
();
tidy_up_after_search
();
refresh_needed
=
TRUE
;
/* Process the end of the three processes. */
...
...
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