svn commit: trunk/busybox/miscutils
vda at busybox.net
vda at busybox.net
Thu Mar 8 18:12:02 UTC 2007
Author: vda
Date: 2007-03-08 10:12:01 -0800 (Thu, 08 Mar 2007)
New Revision: 18043
Log:
less: make '/' (regex search) scan input if no matches are found
in input taken so far.
Modified:
trunk/busybox/miscutils/less.c
Changeset:
Modified: trunk/busybox/miscutils/less.c
===================================================================
--- trunk/busybox/miscutils/less.c 2007-03-08 18:11:34 UTC (rev 18042)
+++ trunk/busybox/miscutils/less.c 2007-03-08 18:12:01 UTC (rev 18043)
@@ -845,15 +845,10 @@
free(err);
return;
}
+
pattern_valid = 1;
match_pos = 0;
-
fill_match_lines(0);
-
- if (num_matches == 0 || max_fline <= max_displayed_line) {
- buffer_print();
- return;
- }
while (match_pos < num_matches) {
if (match_lines[match_pos] > cur_fline)
break;
@@ -861,8 +856,11 @@
}
if (option_mask32 & LESS_STATE_MATCH_BACKWARDS)
match_pos--;
- normalize_match_pos(match_pos);
- buffer_line(match_lines[match_pos]);
+
+ /* It's possible that no matches are found yet.
+ * goto_match() will read input looking for match,
+ * if needed */
+ goto_match(match_pos);
}
#endif
More information about the busybox-cvs
mailing list