Make repeat#wrap open a fold if &foldopen contains 'all'

Closes #31.
This commit is contained in:
d125q 2014-12-09 00:06:40 +01:00 committed by Tim Pope
parent 2a3c5f8e3c
commit 5eba0f19c8

View File

@ -97,7 +97,7 @@ endfunction
function! repeat#wrap(command,count) function! repeat#wrap(command,count)
let preserve = (g:repeat_tick == b:changedtick) let preserve = (g:repeat_tick == b:changedtick)
exe 'norm! '.(a:count ? a:count : '').a:command . (&foldopen =~# 'undo' ? 'zv' : '') exe 'norm! '.(a:count ? a:count : '').a:command . (&foldopen =~# 'undo\|all' ? 'zv' : '')
if preserve if preserve
let g:repeat_tick = b:changedtick let g:repeat_tick = b:changedtick
endif endif