summaryrefslogtreecommitdiffstats
path: root/runtime/autoload/gzip.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/gzip.vim')
-rw-r--r--runtime/autoload/gzip.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim
index a6467b8f6d..f6f7bc41d4 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: 2005 Jul 26
+" Last Change: 2006 Mar 31
" These functions are used by the gzip plugin.
@@ -84,9 +84,14 @@ fun gzip#read(cmd)
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
+ " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
- execute "silent lockmarks " . l . "r " . tmp
+ if empty
+ execute "silent lockmarks " . l . "r ++edit " . tmp
+ else
+ execute "silent lockmarks " . l . "r " . tmp
+ endif
else
execute "silent " . l . "r " . tmp
endif