<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,47 +4,11 @@ if has(&quot;ruby&quot;)
 &quot; COPIED FROM FUZZYFINDER.VIM {{{
 &quot; since they can't be called from outside fuzzyfinder.vim
 &quot; ====================================================================================
+
 function! s:GetCurrentTagFiles()
   return sort(filter(map(tagfiles(), 'fnamemodify(v:val, '':p'')'), 'filereadable(v:val)'))
 endfunction
 
-function! s:HighlightPrompt(prompt, highlight)
-  syntax clear
-  execute printf('syntax match %s /^\V%s/', a:highlight, escape(a:prompt, '\'))
-endfunction
-
-function! s:HighlightError()
-  syntax clear
-  syntax match Error  /^.*$/
-endfunction
-
-function! s:OpenBuffer(nr, mode)
-  execute printf([
-        \   ':%sbuffer',
-        \   ':%ssbuffer',
-        \   ':vertical :%ssbuffer',
-        \   ':tab :%ssbuffer',
-        \ ][a:mode], a:nr)
-endfunction
-
-function! s:OpenFile(path, mode)
-  let nr = bufnr('^' . a:path . '$')
-  if nr &gt; -1
-    call s:OpenBuffer(nr, a:mode)
-  else
-    execute [
-          \   ':edit ',
-          \   ':split ',
-          \   ':vsplit ',
-          \   ':tabedit ',
-          \ ][a:mode] . s:EscapeFilename(a:path)
-  endif
-endfunction
-
-function! s:EscapeFilename(fn)
-  return escape(a:fn, &quot; \t\n*?[{`$%#'\&quot;|!&lt;&quot;)
-endfunction
-
 function! s:ExistsPrompt(line, prompt)
   return  strlen(a:line) &gt;= strlen(a:prompt) &amp;&amp; a:line[:strlen(a:prompt) -1] ==# a:prompt
 endfunction
@@ -53,13 +17,6 @@ function! s:RemovePrompt(line, prompt)
   return a:line[(s:ExistsPrompt(a:line, a:prompt) ? strlen(a:prompt) : 0):]
 endfunction
 
-function! s:RestorePrompt(line, prompt)
-  let i = 0
-  while i &lt; len(a:prompt) &amp;&amp; i &lt; len(a:line) &amp;&amp; a:prompt[i] ==# a:line[i]
-    let i += 1
-  endwhile
-  return a:prompt . a:line[i : ]
-endfunction
 &quot; ------------------------------------------------------------------------------------
 &quot; }}}
 &quot; ====================================================================================
@@ -122,32 +79,15 @@ RUBY
 
   let g:FuzzyFinderMode.TextMate = copy(g:FuzzyFinderMode.Base)
 
-  &quot; ================================================================================
-  &quot; This function is copied almost whole-sale from fuzzyfinder.vim. Ideally, I could
-  &quot; used the on_complete callback to more cleanly add the new behavior, but the
-  &quot; TextMate-style completion broke a few of fuzzyfinder.vim's assumptions, and the
-  &quot; only way to patch that up was to override Base.complete...which required me to
-  &quot; copy-and-paste much of the original implementation.
-  &quot;
-  &quot; Ugly. But effective.
-  &quot; ================================================================================
-  function! g:FuzzyFinderMode.TextMate.complete(findstart, base)
-    if a:findstart
-      return 0
-    elseif  !s:ExistsPrompt(a:base,self.prompt) || len(s:RemovePrompt(a:base, self.prompt)) &lt; self.min_length
-      return []
-    endif
-    call s:HighlightPrompt(self.prompt, self.prompt_highlight)
-
-    let result = []
-
+  function! g:FuzzyFinderMode.TextMate.on_complete(base)
     if exists('g:fuzzy_enumerating_limit')
       let l:limit = g:fuzzy_enumerating_limit
     else
       let l: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
 
@@ -156,29 +96,16 @@ RUBY
         word = match[:path]
         abbr = &quot;%2d: %s&quot; % [index+1, match[:abbr]]
         menu = &quot;[%5d]&quot; % [match[:score] * 10000]
-        VIM.evaluate(&quot;add(result, { 'word' : #{word.inspect}, 'abbr' : #{abbr.inspect}, 'menu' : #{menu.inspect} })&quot;)
+        VIM.evaluate(&quot;add(result, { 'word' : fnamemodify(#{word.inspect},':~:.'), 'abbr' : #{abbr.inspect}, 'menu' : #{menu.inspect} })&quot;)
       end
 RUBY
-
-    if empty(result) || len(result) &gt;= l:limit
-      call s:HighlightError()
-    endif
-
-    if !empty(result)
-      call feedkeys(&quot;\&lt;C-p&gt;\&lt;Down&gt;&quot;, 'n')
-    endif
-
     return result
   endfunction
 
   function! FuzzyFinderTextMateLauncher(initial_text, partial_matching)
     call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching)
   endfunction
-
-  function! g:FuzzyFinderMode.TextMate.on_open(expr, mode)
-    call s:OpenFile(fnamemodify(a:expr, ':~:.'), a:mode)
-  endfunction
-
+  
   let g:FuzzyFinderOptions.TextMate = copy(g:FuzzyFinderOptions.File)
 endfunction &quot;}}}
 </diff>
      <filename>fuzzyfinder_textmate.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f9fba82f3f73240c657cd88863243a8385852f81</id>
    </parent>
  </parents>
  <author>
    <name>Seth Chandler</name>
    <email>sethbc@sethbc.org</email>
  </author>
  <url>http://github.com/sethbc/fuzzyfinder_textmate/commit/c58fdef4b36dd0351802b4d03d85be7c12cba12c</url>
  <id>c58fdef4b36dd0351802b4d03d85be7c12cba12c</id>
  <committed-date>2009-02-03T21:55:39-08:00</committed-date>
  <authored-date>2009-02-03T21:55:39-08:00</authored-date>
  <message>rewrite using on_complete</message>
  <tree>f550adb10b0546af4fb4c9540576da82b2bc4ba8</tree>
  <committer>
    <name>Seth Chandler</name>
    <email>sethbc@sethbc.org</email>
  </committer>
</commit>
