Better handling of syntax regions

This commit is contained in:
Israel Chauca Fuentes
2017-02-11 22:38:13 -05:00
parent 6f038350de
commit 8204ab4cb8
2 changed files with 9 additions and 1 deletions

View File

@@ -245,7 +245,8 @@ function! delimitMate#InsertCharPre(str) "{{{1
echom 03
return 0
endif
if !empty(filter(s:option('excluded_regions'), 'index(s:synstack(line("."), col(".")), v:val) >= 0'))
let synstack = join(map(synstack(line('.'), col('.')), 'tolower(synIDattr(v:val, "name"))'), ',')
if !empty(filter(s:option('excluded_regions'), 'stridx(synstack, tolower(v:val)) >= 0'))
echom 04
return 0
endif