garbas/vim-snipmate — pull request #112 by mihaifm (2012-11-10 22:25:43+00:00)
Title: Unexpected errors related to glob method, when no snippet is found

There is a problem with a previous pull request: https://github.com/garbas/vim-snipmate/pull/91/files

When no snippet is found, the following errors are thrown:

`Error detected while processing function snipMate#ShowAvailableSnips..snipMate#GetSnippetsForWordBelowCursor..funcref#Call..snipMate#GetSnippets..funcref#Call..snipMate#DefaultPool..snipMate#GetSnippetFiles..49_Glob:
line 9:
E118: Too many arguments for function: glob
Error detected while processing function snipMate#ShowAvailableSnips..snipMate#GetSnippetsForWordBelowCursor..funcref#Call..snipMate#GetSnippets..funcref#Call..snipMate#DefaultPool..snipMate#GetSnippetFiles..49_Glob:
line 9:
E15: Invalid expression: glob(escape(f,"{}"), 0, 1)
Error detected while processing function snipMate#ShowAvailableSnips..snipMate#GetSnippetsForWordBelowCursor..funcref#Call..snipMate#GetSnippets..funcref#Call..snipMate#DefaultPool..snipMate#GetSnippetFiles..49_Glob:
line 10:
E121: Undefined variable: res`

Hopefully this should fix it.