From b905e94673636f3718aa1c9b458348e6448cbb1c Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Thu, 19 Mar 2009 19:15:24 -0400 Subject: [PATCH] fixed arguments for GetSnippet() --- plugin/snipMate.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/snipMate.vim b/plugin/snipMate.vim index 14a5347..ff5e6e2 100644 --- a/plugin/snipMate.vim +++ b/plugin/snipMate.vim @@ -145,13 +145,13 @@ endf " Check if word under cursor is snippet trigger; if it isn't, try checking if " the text after non-word characters is (e.g. check for "foo" in "bar.foo") -fun s:GetSnippet(scope, ft) - let word = a:scope +fun s:GetSnippet(word, scope) + let word = a:word wh !exists('s:snippet') - if exists('s:snippets["'.a:ft.'"]["'.word.'"]') - let s:snippet = s:snippets[a:ft][word] - elseif exists('s:multi_snips["'.a:ft.'"]["'.word.'"]') - let s:snippet = s:ChooseSnippet(a:ft, word) + if exists('s:snippets["'.a:scope.'"]["'.word.'"]') + let s:snippet = s:snippets[a:scope][word] + elseif exists('s:multi_snips["'.a:scope.'"]["'.word.'"]') + let s:snippet = s:ChooseSnippet(a:scope, word) else if match(word, '\W') == -1 | break | endif let word = substitute(word, '.\{-}\W', '', '')