diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-11-14 17:31:59 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-11-14 23:29:09 +0100 |
commit | c37f7bdba5069eb989c3374c660b540e7539f874 (patch) | |
tree | 336173002db9720391b81119494b41f77764e319 | |
parent | 7e0f6211af21ef57f1a3e4eb58fb4ad1903c986c (diff) | |
download | rneovim-c37f7bdba5069eb989c3374c660b540e7539f874.tar.gz rneovim-c37f7bdba5069eb989c3374c660b540e7539f874.tar.bz2 rneovim-c37f7bdba5069eb989c3374c660b540e7539f874.zip |
vim-patch:67abf1592c83
runtime(tar): comment out strange error condition check
https://github.com/vim/vim/commit/67abf1592c83c910c7815478f67e0a8989d51417
Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/autoload/tar.vim | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index b31549a891..e242fe98e3 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,7 +1,7 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: Nov 05, 2023 -" Version: 32a (with modifications from the Vim Project) +" Date: Nov 14, 2023 +" Version: 32b (with modifications from the Vim Project) " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " License: Vim License (see vim's :help license) " @@ -208,27 +208,24 @@ fun! tar#Browse(tarfile) " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") return endif - " If there was an error message, the last line probably matches some keywords but - " should also contain whitespace for readability. Make sure not to match a - " filename that contains the keyword (error/warning/unrecognized/inappropriate, etc) " - " FIXME:is this actually necessary? In case of an error, we should probably - " have noticed in the if statement above since tar should have exited - " with a non-zero exit code. - if line("$") == curlast || ( line("$") == (curlast + 1) && - \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' && - \ getline("$") =~ '\s' ) - redraw! - echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None - keepj sil! %d - let eikeep= &ei - set ei=BufReadCmd,FileReadCmd - exe "r ".fnameescape(a:tarfile) - let &ei= eikeep - keepj sil! 1d -" call Dret("tar#Browse : a:tarfile<".a:tarfile.">") - return - endif + " The following should not be neccessary, since in case of errors the + " previous if statement should have caught the problem (because tar exited + " with a non-zero exit code). + " if line("$") == curlast || ( line("$") == (curlast + 1) && + " \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' && + " \ getline("$") =~ '\s' ) + " redraw! + " echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None + " keepj sil! %d + " let eikeep= &ei + " set ei=BufReadCmd,FileReadCmd + " exe "r ".fnameescape(a:tarfile) + " let &ei= eikeep + " keepj sil! 1d + " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") + " return + " endif " set up maps supported for tar setlocal noma nomod ro |