public
Description: "Ack in Project" TextMate bundle
Clone URL: git://github.com/protocool/ack-tmbundle.git
quicker feedback forced me to redo the tracking of file/line counts
protocool (author)
Wed May 28 19:29:35 -0700 2008
commit  ea42880414f9f7c51a48f1b0a610a647eca197ce
tree    9ed2fbf81aa4d5325819942a8413eb4547ddc08e
parent  20ac6d2a3cf5bd5e596650e04c0db68076ef2fe0
...
26
27
28
29
 
30
31
32
33
34
35
36
 
37
38
39
...
45
46
47
48
 
49
50
51
...
26
27
28
 
29
30
31
32
33
34
35
 
36
37
38
39
...
45
46
47
 
48
49
50
51
0
@@ -26,14 +26,14 @@ class AckInProject::Search
0
   def section_start(file)
0
     self.current_file = file
0
     reset_stripe
0
- puts %Q|<tr><th colspan="2">#{current_file}</th></tr>|
0
+ puts %Q|<tr><th colspan="2">#{current_file}<script>f();</script></th></tr>|
0
     puts %Q|<tbody class="matches">|
0
     file_matched()
0
   end
0
   
0
   def section_end
0
     if current_file
0
- puts %Q|<tr><td>&nbsp;</td><td>&nbsp;<script>matched(#{files_matched}, #{lines_matched});</script></td></tr>|
0
+ puts %Q|<tr><td>&nbsp;</td><td>&nbsp;</td></tr>|
0
       puts %Q|</tbody>|
0
     end
0
     self.current_file = nil
0
@@ -45,7 +45,7 @@ class AckInProject::Search
0
   end
0
   
0
   def content_line(line, content)
0
- puts %Q|<tr class="content#{stripe}"><td>#{line}</td><td>#{linked_content(line, content)}</td></tr>|
0
+ puts %Q|<tr class="content#{stripe}"><td>#{line}<script>l();</script></td><td>#{linked_content(line, content)}</td></tr>|
0
     line_matched()
0
   end
0
 
...
1
2
3
 
 
 
 
 
 
 
 
 
 
 
4
5
6
...
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1,6 +1,14 @@
0
-function matched(files, lines) {
0
- document.getElementById('filecount').innerText = ('' + files).concat(' file').concat( (files == 1 ) ? '' : 's' );
0
- document.getElementById('linecount').innerText = ('' + lines).concat(' line').concat( (lines == 1 ) ? '' : 's' );
0
+var foundFiles = 0;
0
+var foundLines = 0;
0
+
0
+function f() {
0
+ foundFiles += 1;
0
+ document.getElementById('filecount').innerText = ('' + foundFiles).concat(' file').concat( (foundFiles == 1 ) ? '' : 's' );
0
+}
0
+
0
+function l() {
0
+ foundLines += 1;
0
+ document.getElementById('linecount').innerText = ('' + foundLines).concat(' line').concat( (foundLines == 1 ) ? '' : 's' );
0
 }
0
 
0
 function searchStarted() {

Comments

    No one has commented yet.