Commit: runtime(gzip): load undofile if there exists one

3 views
Skip to first unread message

Christian Brabandt

unread,
Nov 26, 2024, 9:15:15 AM11/26/24
to vim...@googlegroups.com
runtime(gzip): load undofile if there exists one

Commit: https://github.com/vim/vim/commit/7e501f4d9986866382888e67d8f11faf5767c8f4
Author: Christian Brabandt <c...@256bit.org>
Date: Tue Nov 26 15:10:33 2024 +0100

runtime(gzip): load undofile if there exists one

fixes: https://github.com/vim/vim/issues/16102
closes: https://github.com/vim/vim/issues/16122

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim
index 26b1cda03..a6fbe2c33 100644
--- a/runtime/autoload/gzip.vim
+++ b/runtime/autoload/gzip.vim
@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2024 Nov 25
" Former Maintainer: Bram Moolenaar <Br...@vim.org>

" These functions are used by the gzip plugin.
@@ -148,6 +148,9 @@ fun gzip#read(cmd)
else
let fname = escape(expand("%:r"), "
*?[{`$\%#'\"|!<")
endif
+ if filereadable(undofile(expand("%")))
+ exe "sil rundo " . fnameescape(undofile(expand("%")))
+ endif
if &verbose >= 8
execute "doau BufReadPost " . fname
else
Reply all
Reply to author
Forward
0 new messages