From 5bd4c87a1417a7187d0329e81eb83514ee481250 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 8 Jul 2024 10:12:33 -0400 Subject: [PATCH] Restore unfolding during undo References: https://github.com/tpope/vim-repeat/issues/63 --- autoload/repeat.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/repeat.vim b/autoload/repeat.vim index 1144f60..e6315c4 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -124,6 +124,7 @@ function! repeat#errmsg() endfunction function! repeat#wrap(command,count) + exe (&foldopen =~# 'undo\|all' ? 'norm! zv' : '') let preserve = (g:repeat_tick == b:changedtick) return (a:count ? a:count : '') . a:command . (preserve ? ":let g:repeat_tick = b:changedtick\r" : '') endfunction