Skip to content

Commit baf89ad

Browse files
committed
Only reindent when enabled by Vim option
References: tpope/vim-markdown#187
1 parent aeb9332 commit baf89ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/surround.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ function! s:insert(...) " {{{1
360360
return "\<Del>"
361361
endfunction " }}}1
362362

363-
function! s:reindent() " {{{1
364-
if exists("b:surround_indent") ? b:surround_indent : (!exists("g:surround_indent") || g:surround_indent)
363+
function! s:reindent() abort " {{{1
364+
if get(b:, 'surround_indent', get(g:, 'surround_indent', 1)) && (!empty(&equalprg) || !empty(&indentexpr) || &cindent || &smartindent || &lisp)
365365
silent norm! '[=']
366366
endif
367367
endfunction " }}}1

0 commit comments

Comments
 (0)