From afa9ecc1763ddc15876bd16d5cd8b81148b5605c Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Mon, 18 Nov 2013 12:02:49 +0900 Subject: [PATCH] - Fixed #190 regexp feature. --- autoload/neosnippet.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index ffadd67..2930514 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: neosnippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 12 Nov 2013. +" Last Modified: 18 Nov 2013. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -1012,16 +1012,17 @@ function! neosnippet#get_snippets() "{{{ call extend(snippets, s:snippets[filetype], 'keep') endfor + let cur_text = neosnippet#util#get_cur_text() + if mode() ==# 'i' " Special filters. - let cur_text = neosnippet#util#get_cur_text() if !s:is_beginning_of_line(cur_text) call filter(snippets, '!v:val.options.head') endif - - call filter(snippets, "cur_text =~ get(v:val, 'regexp', '')") endif + call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')") + return snippets endfunction"}}} function! neosnippet#get_snippets_directory() "{{{