Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #210 from codebeige/fix_expand_cr_for_excluded_ft

Prevent errors inside excluded filetype
commit d24ad6b301685cd3b9278420248cc780fdc8fc59 2 parents 81de76f + 03e9458
@Raimondi authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 autoload/delimitMate.vim
View
10 autoload/delimitMate.vim
@@ -196,7 +196,17 @@ function! s:get_syn_name() "{{{
return synIDattr(synIDtrans(synID(line('.'), col, 1)), 'name')
endfunction " }}}
+function! s:is_excluded_ft(ft) "{{{
+ if !exists("g:delimitMate_excluded_ft")
+ return 0
+ endif
+ return index(split(g:delimitMate_excluded_ft, ','), a:ft, 0, 1) >= 0
+endfunction "}}}
+
function! s:is_forbidden(char) "{{{
+ if s:is_excluded_ft(&filetype)
+ return 1
+ endif
if !s:get('excluded_regions_enabled')
return 0
endif
Please sign in to comment.
Something went wrong with that request. Please try again.