From 90fae3663f543e9573c4e69380cfcdcbc7bb34fc Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Mon, 18 May 2015 18:30:10 +0300 Subject: vim-patch:4abac79 #2694 Update runtime files. https://code.google.com/p/vim/source/detail?r=4abac79c0b7ae7aac0cb32d9930e155de628b63f --- runtime/autoload/gzip.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/autoload') diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim index 1245fdddc9..a6b4605b06 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 -" 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("")) let nmt = s:tempname(nm) -- cgit