projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a35de5
)
Fixed a bug when the -y option is not there.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 10 Feb 2012 10:42:53 +0000
(11:42 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 10 Feb 2012 10:42:53 +0000
(11:42 +0100)
selector.c
patch
|
blob
|
history
diff --git
a/selector.c
b/selector.c
index
06c43e3
..
effd014
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-624,10
+624,14
@@
void update_screen(int *current_focus_line, int *displayed_focus_line,
initialize_matcher(&matcher, use_regexp, case_sensitive, pattern);
initialize_matcher(&matcher, use_regexp, case_sensitive, pattern);
- if(show_hits && matcher.nb_patterns >= 0) {
- switches = safe_malloc(sizeof(int) * matcher.nb_patterns * 2);
+ if(show_hits) {
+ if(matcher.nb_patterns >= 0) {
+ switches = safe_malloc(sizeof(int) * matcher.nb_patterns * 2);
+ } else {
+ switches = safe_malloc(sizeof(int) * 2);
+ }
} else {
} else {
- switches =
safe_malloc(sizeof(int) * 2)
;
+ switches =
0
;
}
console_width = getmaxx(stdscr);
}
console_width = getmaxx(stdscr);