diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-11-26 15:39:15 +0100 |
---|---|---|
committer | Christian Clason <ch.clason+github@icloud.com> | 2024-11-27 08:45:22 +0100 |
commit | 078e8e57d3a0c806bffc0de70ee4a027a3af1580 (patch) | |
tree | e1ff9db9490fb53f8bf22fa9aa7782f7f53d82a0 /runtime | |
parent | d460928263d0ff53283f301dfcb85f5b6e17d2ac (diff) | |
download | rneovim-078e8e57d3a0c806bffc0de70ee4a027a3af1580.tar.gz rneovim-078e8e57d3a0c806bffc0de70ee4a027a3af1580.tar.bz2 rneovim-078e8e57d3a0c806bffc0de70ee4a027a3af1580.zip |
vim-patch:7e501f4: runtime(gzip): load undofile if there exists one
fixes: vim/vim#16102
closes: vim/vim#16122
https://github.com/vim/vim/commit/7e501f4d9986866382888e67d8f11faf5767c8f4
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/gzip.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim index 26b1cda034..a6fbe2c336 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 <Bram@vim.org> " These functions are used by the gzip plugin. @@ -148,6 +148,9 @@ fun gzip#read(cmd) else let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<") endif + if filereadable(undofile(expand("%"))) + exe "sil rundo " . fnameescape(undofile(expand("%"))) + endif if &verbose >= 8 execute "doau BufReadPost " . fname else |