public
Description: "Ack in Project" TextMate bundle
Clone URL: git://github.com/protocool/ack-tmbundle.git
query and update 'find' pasteboard as per user requests
* means you can now do command-g in the editor to go to
  the next match. (caveat being a 'literal' ack setting
  vs a 'Regular Expression' find-panel setting).
protocool (author)
Thu Jun 05 14:24:37 -0700 2008
commit  dedd899bd16482912eed917564e80ad93a5e557b
tree    a73349eba301400b16412ea0a21edd7213f9d1e5
parent  63a0af3a739220dfb01b4256b9931e513566c818
...
120
121
122
 
 
 
 
 
 
 
 
 
 
123
124
125
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
0
@@ -120,6 +120,16 @@ module AckInProject
0
       %x{#{history_command}}
0
     rescue
0
     end
0
+
0
+ def pbfind
0
+ @pbfind ||= %x[pbpaste -pboard find]
0
+ end
0
+
0
+ def update_pbfind(search)
0
+ @pbfind = search
0
+ IO.popen('pbcopy -pboard find', 'w') {|pbcopy| pbcopy.write @pbfind}
0
+ end
0
+
0
   end
0
 end
0
 
...
89
90
91
 
92
93
94
...
89
90
91
92
93
94
95
0
@@ -89,6 +89,7 @@ class AckInProject::Search
0
     options << "--#{result['loadAckRC'] == 1 ? '' : 'no'}env"
0
 
0
     AckInProject.update_search_history result['returnArgument']
0
+ AckInProject.update_pbfind result['returnArgument']
0
 
0
     %{cd #{e_sh search_directory}; #{e_sh ack} #{options.join(' ')} #{e_sh result['returnArgument']}}
0
   end
...
25
26
27
28
 
29
30
31
 
32
33
34
...
25
26
27
 
28
29
30
 
31
32
33
34
0
@@ -25,10 +25,10 @@ class AckInProject::SearchDialog
0
   end
0
   
0
   def params
0
- history = AckInProject::search_history
0
+ history = AckInProject.search_history
0
     {
0
       #'contentHeight' => 168,
0
- 'ackExpression' => history.first.to_s,
0
+ 'ackExpression' => AckInProject.pbfind,
0
       'ackHistory' => history
0
     }
0
   end

Comments

    No one has commented yet.