diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-11-05 17:02:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-11-05 17:02:17 +0100 |
commit | 32efaf6154071c21ff975429ae74e507b93311b1 (patch) | |
tree | 9bb0ef770a36608183faf2de064806a07bead9ce /runtime/autoload | |
parent | 72971a26119ce781161fb2a281fcaf27880a909e (diff) | |
download | vim-git-32efaf6154071c21ff975429ae74e507b93311b1.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/gzip.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim index 1245fdddc..a6b4605b0 100644 --- a/runtime/autoload/gzip.vim +++ b/runtime/autoload/gzip.vim @@ -1,6 +1,6 @@ " Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2008 Jul 04 +" Last Change: 2014 Nov 05 " These functions are used by the gzip plugin. @@ -120,6 +120,8 @@ fun gzip#read(cmd) silent! exe "bwipe " . tmp_esc silent! exe "bwipe " . tmpe_esc endif + " Store the OK flag, so that we can use it when writing. + let b:uncompressOk = ok " Restore saved option values. let &pm = pm_save @@ -146,8 +148,10 @@ endfun " After writing compressed file: Compress written file with "cmd" fun gzip#write(cmd) + if exists('b:uncompressOk') && !b:uncompressOk + echomsg "Not compressing file because uncompress failed; reset b:uncompressOk to compress anyway" " don't do anything if the cmd is not supported - if s:check(a:cmd) + elseif s:check(a:cmd) " Rename the file before compressing it. let nm = resolve(expand("<afile>")) let nmt = s:tempname(nm) |