#7 fix - avoid enabling autoformat for code blocks

Found a bug with new feature and fixed.
This commit is contained in:
Reed Esau
2014-08-25 02:11:37 -06:00
parent a7996a75b5
commit 19c1dba18f
2 changed files with 2 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ fun! s:enable_autoformat(mode)
let l:okay_to_enable = 1 let l:okay_to_enable = 1
for l:sid in synstack(line('.'), col('.')) for l:sid in synstack(line('.'), col('.'))
if match(synIDattr(l:sid, 'name'), if match(synIDattr(l:sid, 'name'),
\ g:pencil#autoformat_exclude_re) == -1 \ g:pencil#autoformat_exclude_re) >= 0
let l:okay_to_enable = 0 let l:okay_to_enable = 0
break break
en en

View File

@@ -42,7 +42,7 @@ if !exists('g:pencil#autoformat_exclude')
\ ] \ ]
en en
let g:pencil#autoformat_exclude_re = let g:pencil#autoformat_exclude_re =
\ '(' . join(g:pencil#autoformat_exclude, '|') . ')' \ '\v(' . join(g:pencil#autoformat_exclude, '|') . ')'
if !exists('g:pencil#joinspaces') if !exists('g:pencil#joinspaces')
" by default, only one space after full stop (.) " by default, only one space after full stop (.)