Skip to content

Commit

Permalink
fix to work with latest fuzzyfinder.vim
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Dec 19, 2008
1 parent 8d7e5af commit a8b10e4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions fuzzyfinder_textmate.vim
Expand Up @@ -21,7 +21,7 @@ endfunction
" }}}
" ====================================================================================

command! -bang -narg=? -complete=file FuzzyFinderTextMate call FuzzyFinderTextMateLauncher(<q-args>, len(<q-bang>), bufnr('%'), s:GetCurrentTagFiles())
command! -bang -narg=? -complete=file FuzzyFinderTextMate call FuzzyFinderTextMateLauncher(<q-args>, len(<q-bang>))

function! InstantiateTextMateMode() "{{{
ruby << RUBY
Expand Down Expand Up @@ -60,9 +60,9 @@ RUBY
let g:fuzzy_ignore = ""
endif

" Configuration option: g:fuzzy_matching_limit
" Configuration option: g:fuzzy_enumerating_limit
" The maximum number of matches to return at a time. Defaults to 200, via the
" g:FuzzyFinderMode.TextMate.matching_limit variable, but using a global variable
" g:FuzzyFinderMode.TextMate.enumerating_limit variable, but using a global variable
" makes it easier to set this value.

ruby << RUBY
Expand Down Expand Up @@ -97,10 +97,10 @@ RUBY

let result = []

if exists('g:fuzzy_matching_limit')
let l:limit = g:fuzzy_matching_limit
if exists('g:fuzzy_enumerating_limit')
let l:limit = g:fuzzy_enumerating_limit
else
let l:limit = self.matching_limit
let l:limit = self.enumerating_limit
endif

ruby << RUBY
Expand All @@ -116,7 +116,7 @@ RUBY
end
RUBY

if empty(result) || len(result) >= self.matching_limit
if empty(result) || len(result) >= l:limit
call s:HighlightError()
endif

Expand All @@ -127,20 +127,20 @@ RUBY
return result
endfunction

function! FuzzyFinderTextMateLauncher(initial_text, partial_matching, prev_bufnr, tag_files)
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching, a:prev_bufnr, a:tag_files)
function! FuzzyFinderTextMateLauncher(initial_text, partial_matching)
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching)
endfunction

let g:FuzzyFinderOptions.TextMate = copy(g:FuzzyFinderOptions.File)
endfunction "}}}

if !exists('loaded_fuzzyfinder') "{{{
function! FuzzyFinderTextMateLauncher(initial_text, partial_matching, prev_bufnr, tag_files)
function! FuzzyFinderTextMateLauncher(initial_text, partial_matching)
call InstantiateTextMateMode()
function! FuzzyFinderTextMateLauncher(initial_text, partial_matching, prev_bufnr, tag_files)
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching, a:prev_bufnr, a:tag_files)
function! FuzzyFinderTextMateLauncher(initial_text, partial_matching)
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching)
endfunction
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching, a:prev_bufnr, a:tag_files)
call g:FuzzyFinderMode.TextMate.launch(a:initial_text, a:partial_matching)
endfunction
finish
end "}}}
Expand Down

0 comments on commit a8b10e4

Please sign in to comment.