projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5e16ca
)
Cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 5 May 2009 06:07:04 +0000
(08:07 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 5 May 2009 06:07:04 +0000
(08:07 +0200)
selector.cc
patch
|
blob
|
history
diff --git
a/selector.cc
b/selector.cc
index
6360698
..
637ae74
100644
(file)
--- a/
selector.cc
+++ b/
selector.cc
@@
-200,11
+200,11
@@
int match(char *string, matcher_t *matcher) {
}
void free_matcher(matcher_t *matcher) {
}
void free_matcher(matcher_t *matcher) {
- if(matcher->nb_patterns >= 0) {
+ if(matcher->nb_patterns < 0) {
+ if(!matcher->regexp_error) regfree(&matcher->preg);
+ } else {
delete[] matcher->splitted_patterns;
delete[] matcher->patterns;
delete[] matcher->splitted_patterns;
delete[] matcher->patterns;
- } else {
- if(!matcher->regexp_error) regfree(&matcher->preg);
}
}
}
}
@@
-388,7
+388,7
@@
void update_screen(int *current_line, int *temporary_line, int motion,
int first_line = new_line, last_line = new_line, nb_match = 1;
// We find the first and last line to show, so that the total of
int first_line = new_line, last_line = new_line, nb_match = 1;
// We find the first and last line to show, so that the total of
- // visible lines between them (them include
) is console_height -
1
+ // visible lines between them (them include
d) is console_height-
1
while(nb_match < console_height-1 && (first_line > 0 || last_line < nb_lines - 1)) {
while(nb_match < console_height-1 && (first_line > 0 || last_line < nb_lines - 1)) {
@@
-425,8
+425,8
@@
void update_screen(int *current_line, int *temporary_line, int motion,
k++;
}
k++;
}
- // We fill the rest of the line with blanks if
either we did
- //
not clear() or if this is the
highlighted line
+ // We fill the rest of the line with blanks if
this is the
+ // highlighted line
if(l == new_line) {
while(k < console_width) {
if(l == new_line) {
while(k < console_width) {