Skip to content

Commit

Permalink
Change quoting when filtering snippets
Browse files Browse the repository at this point in the history
Using double quotes for the outer string and single quotes for the inner
prevented any way to properly escape a single quote in the word. This
probably doesn't make a difference anywhere.
  • Loading branch information
ajzafar committed Feb 19, 2014
1 parent d7918d0 commit 43e8b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/snipMate.vim
Expand Up @@ -716,7 +716,7 @@ endf

fun! snipMate#GetSnippetsForWordBelowCursorForComplete(word)
let snippets = map(snipMate#GetSnippetsForWordBelowCursor(a:word, '*', 0), 'v:val[0]')
return filter(snippets, "v:val =~# '\\V\\^" . escape(a:word, '\') . "'")
return filter(snippets, 'v:val =~# "\\V\\^' . escape(a:word, '"\') . '"')
endf

fun! snipMate#CanBeTriggered()
Expand Down

0 comments on commit 43e8b9a

Please sign in to comment.