diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-25 11:34:48 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-27 09:21:33 -0400 |
commit | 5e1f434764bc553d49baeeca1bdd952e0a366e98 (patch) | |
tree | f1d163de497969c11626a1fbf6ef3032add67d11 /runtime/autoload | |
parent | c8f07e5e1f073d7ed8eb7cd0185b7b5fa26ad474 (diff) | |
download | rneovim-5e1f434764bc553d49baeeca1bdd952e0a366e98.tar.gz rneovim-5e1f434764bc553d49baeeca1bdd952e0a366e98.tar.bz2 rneovim-5e1f434764bc553d49baeeca1bdd952e0a366e98.zip |
vim-patch:2963456ff2b7
Update runtime files.
https://github.com/vim/vim/commit/2963456ff2b740244b3a064785fe681b1998d75e
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/zip.vim | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index ea086e0882..874f44559c 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,10 +1,10 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Sep 13, 2016 -" Version: 28 -" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> +" Date: Jan 07, 2020 +" Version: 30 +" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1 +" Copyright: Copyright (C) 2005-2019 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, @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v28" +let g:loaded_zip= "v30" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2 or later" @@ -65,14 +65,14 @@ endif " zip#Browse: {{{2 fun! zip#Browse(zipfile) " call Dfunc("zip#Browse(zipfile<".a:zipfile.">)") - " sanity check: ensure that the zipfile has "PK" as its first two letters + " 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) + exe "noswapfile noautocmd noswapfile 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 - it's a zip file") +" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - its a zip file") endif let repkeep= &report @@ -95,7 +95,7 @@ fun! zip#Browse(zipfile) endif if !filereadable(a:zipfile) if a:zipfile !~# '^\a\+://' - " if it's an url, don't complain, let url-handlers such as vim do its thing + " if its an url, don't complain, let url-handlers such as vim do its thing redraw! echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None " call inputsave()|call input("Press <cr> to continue")|call inputrestore() @@ -141,8 +141,11 @@ fun! zip#Browse(zipfile) " Maps associated with zip plugin setlocal noma nomod ro - noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr> - noremap <silent> <buffer> x :call zip#Extract()<cr> + noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr> + noremap <silent> <buffer> x :call zip#Extract()<cr> + if &mouse != "" + noremap <silent> <buffer> <leftmouse> <leftmouse>:call <SID>ZipBrowseSelect()<cr> + endif let &report= repkeep " call Dret("zip#Browse") @@ -175,17 +178,17 @@ fun! s:ZipBrowseSelect() " get zipfile to the new-window let zipfile = b:zipfile - let curfile= expand("%") + let curfile = expand("%") " call Decho("zipfile<".zipfile.">") " call Decho("curfile<".curfile.">") - new + noswapfile new if !exists("g:zip_nomax") || g:zip_nomax == 0 wincmd _ endif let s:zipfile_{winnr()}= curfile " call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname)) - exe "e ".fnameescape("zipfile:".zipfile.'::'.fname) + exe "noswapfile e ".fnameescape("zipfile:".zipfile.'::'.fname) filetype detect let &report= repkeep @@ -339,7 +342,7 @@ fun! zip#Write(fname) let binkeep= &binary let eikeep = &ei set binary ei=all - exe "e! ".fnameescape(zipfile) + exe "noswapfile e! ".fnameescape(zipfile) call netrw#NetWrite(netzipfile) let &ei = eikeep let &binary = binkeep |