Merge pull request #374 from tmsanrinsha/fix-shiftwidth

Use shiftwidth()
This commit is contained in:
Shougo 2017-02-13 16:43:13 +09:00 committed by GitHub
commit e586fd3d3e
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ function! s:indent_snippet(begin, end) abort "{{{
if &l:expandtab && current_line =~ '^\t\+'
" Expand tab.
cal setline('.', substitute(current_line,
\ '^\t\+', base_indent . repeat(' ', &shiftwidth *
\ '^\t\+', base_indent . repeat(' ', shiftwidth() *
\ len(matchstr(current_line, '^\t\+'))), ''))
elseif line_nr != a:begin
call setline('.', base_indent . current_line)

View File

@ -48,7 +48,7 @@ function! SnippetsIndent() abort "{{{
if prev_line =~ '^\s*$'
return 0
elseif prev_line =~ '^' . syntax && line !~ '^\s*' . syntax
return &shiftwidth
return shiftwidth()
else
return match(line, '\S')
endif