To: vim-dev@vim.org Subject: Patch 6.2.166 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.166 Problem: When $GZIP contains "-N" editing compressed files doesn't work properly. Solution: Add "-n" to "gzip -d" to avoid restoring the file name. (Oyvind Holm) Files: runtime/plugin/gzip.vim *** ../vim-6.2.165/runtime/plugin/gzip.vim Sun Apr 6 17:30:34 2003 --- runtime/plugin/gzip.vim Mon Dec 22 16:14:42 2003 *************** *** 1,6 **** " Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar ! " Last Change: 2003 Apr 06 " Exit quickly when: " - this plugin was already loaded --- 1,6 ---- " Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar ! " Last Change: 2003 Dec 22 " Exit quickly when: " - this plugin was already loaded *************** *** 19,31 **** " set binary mode before reading the file " use "gzip -d", gunzip isn't always available autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin ! autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -d") autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress") autocmd BufWritePost,FileWritePost *.gz call s:write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2") autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f") ! autocmd FileAppendPre *.gz call s:appre("gzip -d") autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d") autocmd FileAppendPre *.Z call s:appre("uncompress") autocmd FileAppendPost *.gz call s:write("gzip") --- 19,31 ---- " set binary mode before reading the file " use "gzip -d", gunzip isn't always available autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin ! autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -dn") autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress") autocmd BufWritePost,FileWritePost *.gz call s:write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2") autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f") ! autocmd FileAppendPre *.gz call s:appre("gzip -dn") autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d") autocmd FileAppendPre *.Z call s:appre("uncompress") autocmd FileAppendPost *.gz call s:write("gzip") *************** *** 69,75 **** let tmpe = tmp . "." . expand(":e") " write the just read lines to a temp file "'[,']w tmp.gz" execute "silent '[,']w " . tmpe ! " uncompress the temp file: call system("gzip -d tmp.gz") call system(a:cmd . " " . tmpe) " delete the compressed lines; remember the line number let l = line("'[") - 1 --- 69,75 ---- let tmpe = tmp . "." . expand(":e") " write the just read lines to a temp file "'[,']w tmp.gz" execute "silent '[,']w " . tmpe ! " uncompress the temp file: call system("gzip -dn tmp.gz") call system(a:cmd . " " . tmpe) " delete the compressed lines; remember the line number let l = line("'[") - 1 *** ../vim-6.2.165/src/version.c Mon Dec 29 21:00:25 2003 --- src/version.c Mon Dec 29 21:04:18 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 166, /**/ -- From "know your smileys": C=}>;*{)) Drunk, devilish chef with a toupee in an updraft, a mustache, and a double chin /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///