diff --git a/plugin/surround.vim b/plugin/surround.vim index 527dc3c..5d22ebd 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -360,8 +360,8 @@ function! s:insert(...) " {{{1 return "\" endfunction " }}}1 -function! s:reindent() " {{{1 - if exists("b:surround_indent") ? b:surround_indent : (!exists("g:surround_indent") || g:surround_indent) +function! s:reindent() abort " {{{1 + if get(b:, 'surround_indent', get(g:, 'surround_indent', 1)) && (!empty(&equalprg) || !empty(&indentexpr) || &cindent || &smartindent || &lisp) silent norm! '[='] endif endfunction " }}}1