<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -91,28 +91,25 @@ RUBY
 
   function! g:FuzzyFinderMode.TextMate.on_complete(base)
     if exists('g:fuzzy_enumerating_limit')
-      let l:limit = g:fuzzy_enumerating_limit
+      let l:enumerating_limit = g:fuzzy_enumerating_limit
     else
-      let l:limit = self.enumerating_limit
+      let l:enumerating_limit = self.enumerating_limit
     endif
     let result = []
     ruby &lt;&lt; RUBY
 
       text = VIM.evaluate('s:RemovePrompt(a:base,self.prompt)')
-      limit = VIM.evaluate('l:limit').to_i
+      enumerating_limit = VIM.evaluate('l:enumerating_limit').to_i
       path_display = VIM.evaluate(&quot;g:fuzzy_path_display&quot;)
+      ceiling = VIM.evaluate('g:fuzzy_ceiling').to_i
 
-      matches = finder.find(text, limit)
-      matches.sort_by { |a| [-a[:score], a[:path]] }.each_with_index do |match, index|
+      matches = finder.find(text, ceiling)
+      matches_length = matches.length
+      matches.sort_by { |a| [-a[:score], a[:path]] }[0,enumerating_limit].each_with_index do |match, index|
         word = match[:path]
-        case path_display
-          when &quot;full&quot;
-            abbr = &quot;%2d: %s&quot; % [index+1, match[:path]]
-          else
-            abbr = &quot;%2d: %s&quot; % [index+1, match[:abbr]]
-        end
+        abbr = &quot;%2d: %s&quot; % [index+1, match[path_display.to_sym]]
         menu = &quot;[%5d]&quot; % [match[:score] * 10000]
-        VIM.evaluate(&quot;add(result, { 'word' : fnamemodify(#{word.inspect},':~:.'), 'abbr' : #{abbr.inspect}, 'menu' : #{menu.inspect} })&quot;)
+        VIM.evaluate(&quot;add(result, { 'word' : fnamemodify(#{word.inspect},':~:.'), 'abbr' : #{abbr.inspect}, 'menu' : #{menu.inspect}, 'ranks': [#{index}] })&quot;)
       end
 RUBY
     return result
@@ -139,4 +136,3 @@ end &quot;}}}
 call InstantiateTextMateMode()
 
 endif
-</diff>
      <filename>fuzzyfinder_textmate.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>06948420fafde2a207886503ec5007a46c11ad02</id>
    </parent>
  </parents>
  <author>
    <name>Cristi Balan</name>
    <email>evil@che.lu</email>
  </author>
  <url>http://github.com/sethbc/fuzzyfinder_textmate/commit/0d8840cdfed51151223b10446f0e845963a3f2e4</url>
  <id>0d8840cdfed51151223b10446f0e845963a3f2e4</id>
  <committed-date>2009-02-10T22:53:50-08:00</committed-date>
  <authored-date>2009-02-08T16:16:53-08:00</authored-date>
  <message>fix crap. it was completely broken

* use g:fuzzy_ceiling to limit how many items fuzzy_file_finder searches
* use g:fuzzy_enumerating_limit to limit how many items are displayed
* send sorted rank to fuzzyfinder so sorting is done properly

to benefit more from this, you should get evilchelu/fuzzy_file_finder too

Signed-off-by: Seth Chandler &lt;sethbc@sethbc.org&gt;</message>
  <tree>5d0f846069126f368d5324dc8756c056893fa79c</tree>
  <committer>
    <name>Seth Chandler</name>
    <email>sethbc@sethbc.org</email>
  </committer>
</commit>
