Hi,

the unzip plugin shipped with the vim 7.3 release does not properly
work for zip files that contain comments. Attached you can find a
patch that should fix that problem by invoking unzip with the "-Z -1"
arguments instead of manually cleaning the output.

Regards,
Gregor Uhlenheuer

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
--- zip.vim.orig        2010-12-24 01:32:11.000000000 +0100
+++ /usr/share/vim/vim73/autoload/zip.vim       2010-12-24 02:28:05.000000000 
+0100
@@ -103,16 +103,13 @@
   set ft=tar
 
   " give header
-  let lastline= line("$")
-  call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
-  call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
-  call setline(lastline+3,'" Select a file with cursor and press ENTER')
-  $put =''
-  0d
+  call append(0, ['" zip.vim version '.g:loaded_zip,
+                \ '" Browsing zipfile '.a:zipfile,
+                \ '" Select a file with cursor and press ENTER'])
   $
 
 "  call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
-  exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
+  exe "silent r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
   if v:shell_error != 0
    redraw!
    echohl WarningMsg | echo "***warning*** (zip#Browse) 
".fnameescape(a:zipfile)." is not a zip file" | echohl None
@@ -126,15 +123,6 @@
 "   call Dret("zip#Browse")
    return
   endif
-"  call Decho("line 6: ".getline(6))
-  let namecol= stridx(getline(6),'Name') + 1
-"  call Decho("namecol=".namecol)
-  4,$g/^\s*----/d
-  4,$g/^\s*\a/d
-  $d
-  if namecol > 0
-   exe 'silent 4,$s/^.*\%'.namecol.'c//'
-  endif
 
   setlocal noma nomod ro
   noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>

Raspunde prin e-mail lui