diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-07-04 22:50:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-07-04 22:50:40 +0200 |
commit | 94f76b7fd66aaa1fcf523d79585530c6c5753514 (patch) | |
tree | b25cdbed254cd1d9fefa37a7c422c257f8874631 /runtime/autoload | |
parent | ba46075731a00cdc7825dd1feea1272cd475da36 (diff) | |
download | vim-git-94f76b7fd66aaa1fcf523d79585530c6c5753514.tar.gz |
updated for version 7.3.1308v7.3.1308
Problem: Typos in MS-Windows build settings and README.
Solution: Minor changes to MS-Windows files.
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/zip.vim | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index b7a5bffbf..687500ebe 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,10 +1,10 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Apr 17, 2013 -" Version: 26 +" Date: Jul 02, 2013 +" Version: 27 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005-2012 Charles E. Campbell {{{1 +" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -13,13 +13,14 @@ " this plugin, you agree that in no event will the copyright " holder be liable for any damages resulting from the use " of this software. +"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore() " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v26" +let g:loaded_zip= "v27" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2" @@ -28,6 +29,7 @@ if v:version < 702 endif let s:keepcpo= &cpo set cpo&vim +"DechoTabOn let s:zipfile_escape = ' ?&;\' let s:ERROR = 2 @@ -60,6 +62,16 @@ endif " zip#Browse: {{{2 fun! zip#Browse(zipfile) " call Dfunc("zip#Browse(zipfile<".a:zipfile.">)") + " sanity check: insure that the zipfile has "PK" as its first two letters + " (zipped files have a leading PK as a "magic cookie") + if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK' + exe "noautocmd e ".fnameescape(a:zipfile) +" call Dret("zip#Browse : not a zipfile<".a:zipfile.">") + return +" else " Decho +" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - its a zip file") + endif + let repkeep= &report set report=10 @@ -197,6 +209,7 @@ fun! zip#Read(fname,mode) " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1) " but allows zipfile:... entries in quickfix lists let temp = tempname() +" call Decho("using temp file<".temp.">") let fn = expand('%:p') exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp " call Decho("exe sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp) @@ -208,7 +221,7 @@ fun! zip#Read(fname,mode) filetype detect " cleanup - keepj 0d + " keepj 0d " used to be needed for the ...r! ... method set nomod let &report= repkeep |