- Re-Fixed wrong indentation when 'expandtab'.

This commit is contained in:
Shougo Matsushita 2012-09-27 14:42:37 +09:00
parent 8e7e2d4ee4
commit 7f3241815d

View File

@ -635,7 +635,7 @@ function! s:indent_snippet(begin, end)"{{{
" Delete head tab character.
let current_line = substitute(getline('.'), '^\t', '', '')
if &l:expandtab
if &l:expandtab && current_line =~ '^\t\+'
" Expand tab.
cal setline('.', substitute(current_line,
\ '^\t\+', base_indent . repeat(' ', &shiftwidth *