projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
improve watchdbg and grepdbg
[spider.git]
/
perl
/
watchdbg
diff --git
a/perl/watchdbg
b/perl/watchdbg
index 4ac24be1b02dd34c69b1d0bb9b629640a7edf400..6058ed64566481494a6321a8dab1065734071dc6 100755
(executable)
--- a/
perl/watchdbg
+++ b/
perl/watchdbg
@@
-43,7
+43,10
@@
for (;;) {
if ($exp) {
push @prev, $line;
shift @prev while @prev > $nolines;
- printit(@prev) if $line =~ m{(?:$exp)}oi;
+ if ($line =~ m{(?:$exp)}oi) {
+ printit(@prev);
+ @prev = ();
+ }
} else {
printit($line);
}