To: vim-dev@vim.org Subject: Patch 6.3.068 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3.068 Problem: When editing a compressed file xxx.gz which is a symbolic link to the actual file a ":write" renames the link. Solution: Resolve the link, so that the actual file is renamed and compressed. Files: runtime/plugin/gzip.vim *** ../vim-6.3.025/runtime/plugin/gzip.vim Wed Jun 9 14:56:33 2004 --- runtime/plugin/gzip.vim Thu Mar 24 10:56:30 2005 *************** *** 1,6 **** " Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar ! " Last Change: 2004 Jan 12 " Exit quickly when: " - this plugin was already loaded --- 1,6 ---- " Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar ! " Last Change: 2005 Mar 24 " Exit quickly when: " - this plugin was already loaded *************** *** 113,119 **** " don't do anything if the cmd is not supported if s:check(a:cmd) " Rename the file before compressing it. ! let nm = expand("") let nmt = s:tempname(nm) if rename(nm, nmt) == 0 call system(a:cmd . " " . nmt) --- 113,119 ---- " don't do anything if the cmd is not supported if s:check(a:cmd) " Rename the file before compressing it. ! let nm = resolve(expand("")) let nmt = s:tempname(nm) if rename(nm, nmt) == 0 call system(a:cmd . " " . nmt) *** ../vim-6.3.025/src/version.c Fri Mar 18 19:21:29 2005 --- src/version.c Thu Mar 24 10:59:13 2005 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 68, /**/ -- Are leaders born or made? And if they're made, can we return them under warranty? (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///