mirror of
https://github.com/tpope/vim-surround.git
synced 2025-12-07 21:24:49 +08:00
Only reindent when enabled by Vim option
References: https://github.com/tpope/vim-markdown/pull/187
This commit is contained in:
@@ -360,8 +360,8 @@ function! s:insert(...) " {{{1
|
|||||||
return "\<Del>"
|
return "\<Del>"
|
||||||
endfunction " }}}1
|
endfunction " }}}1
|
||||||
|
|
||||||
function! s:reindent() " {{{1
|
function! s:reindent() abort " {{{1
|
||||||
if exists("b:surround_indent") ? b:surround_indent : (!exists("g:surround_indent") || g:surround_indent)
|
if get(b:, 'surround_indent', get(g:, 'surround_indent', 1)) && (!empty(&equalprg) || !empty(&indentexpr) || &cindent || &smartindent || &lisp)
|
||||||
silent norm! '[=']
|
silent norm! '[=']
|
||||||
endif
|
endif
|
||||||
endfunction " }}}1
|
endfunction " }}}1
|
||||||
|
|||||||
Reference in New Issue
Block a user