]>
Commit | Line | Data |
---|---|---|
d02ad552 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.166 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.2.166 | |
11 | Problem: When $GZIP contains "-N" editing compressed files doesn't work | |
12 | properly. | |
13 | Solution: Add "-n" to "gzip -d" to avoid restoring the file name. (Oyvind | |
14 | Holm) | |
15 | Files: runtime/plugin/gzip.vim | |
16 | ||
17 | ||
18 | *** ../vim-6.2.165/runtime/plugin/gzip.vim Sun Apr 6 17:30:34 2003 | |
19 | --- runtime/plugin/gzip.vim Mon Dec 22 16:14:42 2003 | |
20 | *************** | |
21 | *** 1,6 **** | |
22 | " Vim plugin for editing compressed files. | |
23 | " Maintainer: Bram Moolenaar <Bram@vim.org> | |
24 | ! " Last Change: 2003 Apr 06 | |
25 | ||
26 | " Exit quickly when: | |
27 | " - this plugin was already loaded | |
28 | --- 1,6 ---- | |
29 | " Vim plugin for editing compressed files. | |
30 | " Maintainer: Bram Moolenaar <Bram@vim.org> | |
31 | ! " Last Change: 2003 Dec 22 | |
32 | ||
33 | " Exit quickly when: | |
34 | " - this plugin was already loaded | |
35 | *************** | |
36 | *** 19,31 **** | |
37 | " set binary mode before reading the file | |
38 | " use "gzip -d", gunzip isn't always available | |
39 | autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin | |
40 | ! autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -d") | |
41 | autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d") | |
42 | autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress") | |
43 | autocmd BufWritePost,FileWritePost *.gz call s:write("gzip") | |
44 | autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2") | |
45 | autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f") | |
46 | ! autocmd FileAppendPre *.gz call s:appre("gzip -d") | |
47 | autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d") | |
48 | autocmd FileAppendPre *.Z call s:appre("uncompress") | |
49 | autocmd FileAppendPost *.gz call s:write("gzip") | |
50 | --- 19,31 ---- | |
51 | " set binary mode before reading the file | |
52 | " use "gzip -d", gunzip isn't always available | |
53 | autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin | |
54 | ! autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -dn") | |
55 | autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d") | |
56 | autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress") | |
57 | autocmd BufWritePost,FileWritePost *.gz call s:write("gzip") | |
58 | autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2") | |
59 | autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f") | |
60 | ! autocmd FileAppendPre *.gz call s:appre("gzip -dn") | |
61 | autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d") | |
62 | autocmd FileAppendPre *.Z call s:appre("uncompress") | |
63 | autocmd FileAppendPost *.gz call s:write("gzip") | |
64 | *************** | |
65 | *** 69,75 **** | |
66 | let tmpe = tmp . "." . expand("<afile>:e") | |
67 | " write the just read lines to a temp file "'[,']w tmp.gz" | |
68 | execute "silent '[,']w " . tmpe | |
69 | ! " uncompress the temp file: call system("gzip -d tmp.gz") | |
70 | call system(a:cmd . " " . tmpe) | |
71 | " delete the compressed lines; remember the line number | |
72 | let l = line("'[") - 1 | |
73 | --- 69,75 ---- | |
74 | let tmpe = tmp . "." . expand("<afile>:e") | |
75 | " write the just read lines to a temp file "'[,']w tmp.gz" | |
76 | execute "silent '[,']w " . tmpe | |
77 | ! " uncompress the temp file: call system("gzip -dn tmp.gz") | |
78 | call system(a:cmd . " " . tmpe) | |
79 | " delete the compressed lines; remember the line number | |
80 | let l = line("'[") - 1 | |
81 | *** ../vim-6.2.165/src/version.c Mon Dec 29 21:00:25 2003 | |
82 | --- src/version.c Mon Dec 29 21:04:18 2003 | |
83 | *************** | |
84 | *** 639,640 **** | |
85 | --- 639,642 ---- | |
86 | { /* Add new patch number below this line */ | |
87 | + /**/ | |
88 | + 166, | |
89 | /**/ | |
90 | ||
91 | -- | |
92 | From "know your smileys": | |
93 | C=}>;*{)) Drunk, devilish chef with a toupee in an updraft, | |
94 | a mustache, and a double chin | |
95 | ||
96 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
97 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
98 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
99 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |