annotate src/testdir/test29.in @ 7870:fb5ba6fbc843 v7.4.1232

commit https://github.com/vim/vim/commit/1357caf31f3e447d99baf8dd6a3243e2ab38567f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 1 21:40:14 2016 +0100 patch 7.4.1232 Problem: Compiler warnings when the Sniff feature is enabled. Solution: Add UNUSED.
author Christian Brabandt <cb@256bit.org>
date Mon, 01 Feb 2016 21:45:06 +0100
parents bc269cf15ccd
children ae45d497868f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
1 Test for joining lines and marks in them
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
2 in compatible and nocompatible modes
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 and with 'joinspaces' set or not
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 and with 'cpoptions' flag 'j' set or not
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 STARTTEST
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
7 :so small.vim
2456
2876ac15b8c8 Avoid that running tests changes viminfo.
Bram Moolenaar <bram@vim.org>
parents: 2291
diff changeset
8 :set nocompatible viminfo+=nviminfo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :set nojoinspaces
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
10 :set cpoptions-=j
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 /firstline/
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
12 j"td/^STARTTEST/-1
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
13 PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14 j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
17 j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 firstline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 asdf
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
49 zx cvn.
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
50 as dfg?
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 hjkl iop!
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 ert
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 zx cvn.
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
54 as dfg?
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
55 hjkl iop!
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
56 ert
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
57
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
58 STARTTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
59 /^{/+1
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
60 :set comments=s1:/*,mb:*,ex:*/,://
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
61 :set nojoinspaces fo=j
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
62 :set backspace=eol,start
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
63 :.,+3join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
64 j4J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
65 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
66 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
67 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
68 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
69 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
70 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
71 ENDTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
72
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
73 {
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
74
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
75 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
76 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
77 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
78
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
79 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
80 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
81 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
82
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
83 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
84 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
85
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
86 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
87 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
88
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
89 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
90 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
91
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
92 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
93 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
94
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
95 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
96 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
97 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
98
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
99 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
100 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
101 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
102 }
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
103
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
104 STARTTEST
5852
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
105 :" Test with backspace set to the non-compatible setting
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
106 /^\d\+ this
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
107 :set cp bs=2
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
108 Avim1
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
109 Avim2u
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
110 :set cpo-=<
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
111 :inoremap <c-u> <left><c-u>
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
112 Avim3
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
113 :iunmap <c-u>
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
114 Avim4
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
115 :" Test with backspace set to the compatible setting
7003
bc269cf15ccd patch 7.4.819
Bram Moolenaar <bram@vim.org>
parents: 5852
diff changeset
116 :set backspace= visualbell
5852
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
117 A vim5A
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
118 A vim6Azweiu
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
119 :inoremap <c-u> <left><c-u>
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
120 A vim7
7003
bc269cf15ccd patch 7.4.819
Bram Moolenaar <bram@vim.org>
parents: 5852
diff changeset
121 :set compatible novisualbell
5852
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
122 ENDTEST
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
123 1 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
124 2 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
125 3 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
126 4 this should be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
127 5 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
128 6 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
129 7 this shouldn't be deleted
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
130 8 this shouldn't be deleted (not touched yet)
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
131
81c26975e8f9 updated for version 7.4.269
Bram Moolenaar <bram@vim.org>
parents: 3580
diff changeset
132 STARTTEST
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
133 /^{/+1
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
134 :set comments=sO:*\ -,mO:*\ \ ,exO:*/
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
135 :set comments+=s1:/*,mb:*,ex:*/,://
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
136 :set comments+=s1:>#,mb:#,ex:#<,:<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
137 :set cpoptions-=j joinspaces fo=j
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
138 :set backspace=eol,start
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
139 :.,+3join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
140 j4J
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
141 :.,+8join
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
142 j9J
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
143 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
144 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
145 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
146 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
147 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
148 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
149 j:.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
150 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
151 j:.,+5join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
152 j6J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
153 oSome code! // Make sure backspacing does not remove this comment leader.0i
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
154 ENDTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
155
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
156 {
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
157
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
158 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
159 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
160 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
161
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
162 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
163 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
164 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
165
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
166 /* List:
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
167 * - item1
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
168 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
169 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
170 * - item2
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
171 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
172 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
173 */
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
174
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
175 /* List:
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
176 * - item1
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
177 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
178 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
179 * - item2
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
180 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
181 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
182 */
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
183
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
184 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
185 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
186
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
187 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
188 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
189
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
190 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
191 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
192
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
193 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
194 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
195
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
196 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
197 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
198 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
199
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
200 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
201 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
202 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
203
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
204 int i = 7 /* foo *// 3
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
205 // comment
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
206 ;
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
207
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
208 int i = 7 /* foo *// 3
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
209 // comment
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
210 ;
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
211
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
212 ># Note that the last character of the ending comment leader (left angle
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
213 # bracket) is a comment leader itself. Make sure that this comment leader is
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
214 # not removed from the next line #<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
215 < On this line a new comment is opened which spans 2 lines. This comment should
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
216 < retain its comment leader.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
217
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
218 ># Note that the last character of the ending comment leader (left angle
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
219 # bracket) is a comment leader itself. Make sure that this comment leader is
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
220 # not removed from the next line #<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
221 < On this line a new comment is opened which spans 2 lines. This comment should
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
222 < retain its comment leader.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
223
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
224 }
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
225
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
226 STARTTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
227 :g/^STARTTEST/.,/^ENDTEST/d
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
228 :?firstline?+1,$w! test.out
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
229 :qa!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
230 ENDTEST