annotate runtime/plugin/zipPlugin.vim @ 33874:902b7bdf2afb v9.0.2147

patch 9.0.2147: Type check tests fail without the channel feature Commit: https://github.com/vim/vim/commit/3ee25965e4fbf9f44f5fc31d6a827638e409c6f8 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Dec 4 20:31:14 2023 +0100 patch 9.0.2147: Type check tests fail without the channel feature Problem: Type check tests fail without the channel feature Solution: only run tests, when Vim was build with +channel fixes: #13617 closes: #13619 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Dec 2023 15:16:12 +0100
parents b2e8663e6dcc
children 02bd0fe77c68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
1 " zipPlugin.vim: Handles browsing zipfiles
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
2 " PLUGIN PORTION
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
3 " Date: Dec 07, 2021
19099
1a951a4beee3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10211
diff changeset
4 " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
5 " License: Vim License (see vim's :help license)
10211
b7da8d4c594c commit https://github.com/vim/vim/commit/d07969093a9b3051511c478d71c36de6fc33c0d6
Christian Brabandt <cb@256bit.org>
parents: 5130
diff changeset
6 " Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
7 " Permission is hereby granted to use and distribute this code,
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
8 " with or without modifications, provided that this copyright
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
9 " notice is copied with it. Like anything else that's free,
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
10 " zipPlugin.vim is provided *as is* and comes with no warranty
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
11 " of any kind, either expressed or implied. By using this
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
12 " plugin, you agree that in no event will the copyright
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
13 " holder be liable for any damages resulting from the use
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
14 " of this software.
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
15 "
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
16 " (James 4:8 WEB) Draw near to God, and he will draw near to you.
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
17 " Cleanse your hands, you sinners; and purify your hearts, you double-minded.
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
18 " ---------------------------------------------------------------------
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
19 " Load Once: {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
20 if &cp || exists("g:loaded_zipPlugin")
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
21 finish
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
22 endif
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
23 let g:loaded_zipPlugin = "v33"
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
24 let s:keepcpo = &cpo
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
25 set cpo&vim
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
26
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
27 " ---------------------------------------------------------------------
5130
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
28 " Options: {{{1
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
29 if !exists("g:zipPlugin_ext")
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
30 let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
5130
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
31 endif
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
32
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
33 " ---------------------------------------------------------------------
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
34 " Public Interface: {{{1
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
35 augroup zip
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
36 au!
557
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
37 au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1)
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
38 au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0)
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
39 au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
40 au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
41
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
42 if has("unix")
557
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
43 au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1)
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
44 au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0)
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
45 au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 529
diff changeset
46 au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
47 endif
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
48
5130
71e066e10a47 updated for version 7.3.1308
Bram Moolenaar <bram@vim.org>
parents: 4339
diff changeset
49 exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))'
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
50 augroup END
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
51
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
52 " ---------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
53 " Restoration And Modelines: {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents: 557
diff changeset
54 " vim: fdm=marker
529
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
55 let &cpo= s:keepcpo
0d6092bb72e6 updated for version 7.0148
vimboss
parents:
diff changeset
56 unlet s:keepcpo