projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af6718c
)
Removed a bug when the input file is empty.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 31 Mar 2009 19:46:45 +0000
(21:46 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 31 Mar 2009 19:46:45 +0000
(21:46 +0200)
selector.cc
patch
|
blob
|
history
diff --git
a/selector.cc
b/selector.cc
index
3f8aba7
..
3ffccc1
100644
(file)
--- a/
selector.cc
+++ b/
selector.cc
@@
-228,8
+228,7
@@
void update_screen(int *current_line, int *temporary_line, int motion,
if(matcher.regexp_error) {
addstr("[regexp error]");
- } else {
-
+ } else if(nb_lines > 0) {
int new_line;
if(match(lines[*current_line], &matcher)) {
new_line = *current_line;
@@
-349,6
+348,8
@@
void update_screen(int *current_line, int *temporary_line, int motion,
if(nb_printed_lines == 0) {
addnstr("[no selection]\n", console_width);
}
+ } else {
+ addnstr("[empty choice]\n", console_width);
}
// Draw the modeline