summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0701
blob: de3d606ee52a7023fe7e8a0dfc5536209cb59a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0701
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0701
Problem:    Sign message not translated and inconsistent spacing.
Solution:   Add _() for translation.  Add a space. (Ken Takata)  Also use
            MSG_BUF_LEN instead of BUFSIZ.
Files:	    src/sign.c, src/testdir/test_signs.vim


*** ../vim-8.1.0700/src/sign.c	2019-01-06 16:23:29.499325079 +0100
--- src/sign.c	2019-01-07 20:42:22.384390285 +0100
***************
*** 607,614 ****
  {
      buf_T	*buf;
      signlist_T	*sign;
!     char	lbuf[BUFSIZ];
!     char	group[BUFSIZ];
  
      MSG_PUTS_TITLE(_("\n--- Signs ---"));
      msg_putchar('\n');
--- 607,614 ----
  {
      buf_T	*buf;
      signlist_T	*sign;
!     char	lbuf[MSG_BUF_LEN];
!     char	group[MSG_BUF_LEN];
  
      MSG_PUTS_TITLE(_("\n--- Signs ---"));
      msg_putchar('\n');
***************
*** 620,626 ****
      {
  	if (buf->b_signlist != NULL)
  	{
! 	    vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
  	    MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
  	    msg_putchar('\n');
  	}
--- 620,626 ----
      {
  	if (buf->b_signlist != NULL)
  	{
! 	    vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname);
  	    MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
  	    msg_putchar('\n');
  	}
***************
*** 631,642 ****
  	    if (!sign_in_group(sign, sign_group))
  		continue;
  	    if (sign->group != NULL)
! 		vim_snprintf(group, BUFSIZ, "  group=%s",
  							sign->group->sg_name);
  	    else
  		group[0] = '\0';
! 	    vim_snprintf(lbuf, BUFSIZ, _("    line=%ld  id=%d%s  name=%s "
! 							"priority=%d"),
  			   (long)sign->lnum, sign->id, group,
  			   sign_typenr2name(sign->typenr), sign->priority);
  	    MSG_PUTS(lbuf);
--- 631,642 ----
  	    if (!sign_in_group(sign, sign_group))
  		continue;
  	    if (sign->group != NULL)
! 		vim_snprintf(group, MSG_BUF_LEN, _("  group=%s"),
  							sign->group->sg_name);
  	    else
  		group[0] = '\0';
! 	    vim_snprintf(lbuf, MSG_BUF_LEN,
! 			   _("    line=%ld  id=%d%s  name=%s  priority=%d"),
  			   (long)sign->lnum, sign->id, group,
  			   sign_typenr2name(sign->typenr), sign->priority);
  	    MSG_PUTS(lbuf);
*** ../vim-8.1.0700/src/testdir/test_signs.vim	2019-01-06 16:23:29.499325079 +0100
--- src/testdir/test_signs.vim	2019-01-07 20:48:20.517760217 +0100
***************
*** 67,73 ****
    " Check placed signs
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
! 		\ "    line=3  id=41  name=Sign1 priority=10\n", a)
  
    " Unplace the sign and try jumping to it again should fail.
    sign unplace 41
--- 67,73 ----
    " Check placed signs
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
! 		\ "    line=3  id=41  name=Sign1  priority=10\n", a)
  
    " Unplace the sign and try jumping to it again should fail.
    sign unplace 41
***************
*** 95,101 ****
    sign place 77 line=9 name=Sign2
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
! 		\ "    line=9  id=77  name=Sign2 priority=10\n", a)
    sign unplace *
  
    " Check :jump with file=...
--- 95,101 ----
    sign place 77 line=9 name=Sign2
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for [NULL]:\n" .
! 		\ "    line=9  id=77  name=Sign2  priority=10\n", a)
    sign unplace *
  
    " Check :jump with file=...
***************
*** 161,167 ****
    exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
    let a = execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for foo:\n" .
! 		\ "    line=3  id=20  name=4 priority=10\n", a)
    exe 'sign unplace 20 buffer=' . bufnr('')
    sign undefine 004
    call assert_fails('sign list 4', 'E155:')
--- 161,167 ----
    exe 'sign place 20 line=3 name=004 buffer=' . bufnr('')
    let a = execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for foo:\n" .
! 		\ "    line=3  id=20  name=4  priority=10\n", a)
    exe 'sign unplace 20 buffer=' . bufnr('')
    sign undefine 004
    call assert_fails('sign list 4', 'E155:')
***************
*** 189,195 ****
    " Listing placed sign should show that sign is deleted.
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for foobar:\n" .
! 		\ "    line=1  id=41  name=[Deleted] priority=10\n", a)
  
    sign unplace 41
    let a=execute('sign place')
--- 189,195 ----
    " Listing placed sign should show that sign is deleted.
    let a=execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for foobar:\n" .
! 		\ "    line=1  id=41  name=[Deleted]  priority=10\n", a)
  
    sign unplace 41
    let a=execute('sign place')
***************
*** 613,631 ****
    " :sign place file={fname}
    let a = execute('sign place file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n", a)
  
    " :sign place group={group} file={fname}
    let a = execute('sign place group=g2 file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " :sign place group=* file={fname}
    let a = execute('sign place group=* file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1 priority=10\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1 priority=10\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n", a)
  
    " Error case: non-existing group
    let a = execute('sign place group=xyz file=Xsign')
--- 613,631 ----
    " :sign place file={fname}
    let a = execute('sign place file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n", a)
  
    " :sign place group={group} file={fname}
    let a = execute('sign place group=g2 file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1  priority=10\n", a)
  
    " :sign place group=* file={fname}
    let a = execute('sign place group=* file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1  priority=10\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1  priority=10\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n", a)
  
    " Error case: non-existing group
    let a = execute('sign place group=xyz file=Xsign')
***************
*** 640,658 ****
    " :sign place buffer={fname}
    let a = execute('sign place buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n", a)
  
    " :sign place group={group} buffer={fname}
    let a = execute('sign place group=g2 buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " :sign place group=* buffer={fname}
    let a = execute('sign place group=* buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1 priority=10\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " Error case: non-existing group
    let a = execute('sign place group=xyz buffer=' . bnum)
--- 640,658 ----
    " :sign place buffer={fname}
    let a = execute('sign place buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n", a)
  
    " :sign place group={group} buffer={fname}
    let a = execute('sign place group=g2 buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1  priority=10\n", a)
  
    " :sign place group=* buffer={fname}
    let a = execute('sign place group=* buffer=' . bnum)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1  priority=10\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1  priority=10\n", a)
  
    " Error case: non-existing group
    let a = execute('sign place group=xyz buffer=' . bnum)
***************
*** 661,679 ****
    " :sign place
    let a = execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n", a)
  
    " :sign place group={group}
    let a = execute('sign place group=g1')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1 priority=10\n", a)
  
    " :sign place group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=10\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1 priority=10\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " Test for ':sign jump' command with groups
    sign jump 5 group=g1 file=Xsign
--- 661,679 ----
    " :sign place
    let a = execute('sign place')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n", a)
  
    " :sign place group={group}
    let a = execute('sign place group=g1')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1  priority=10\n", a)
  
    " :sign place group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=10\n" .
! 	      \ "    line=11  id=5  group=g1  name=sign1  priority=10\n" .
! 	      \ "    line=12  id=5  group=g2  name=sign1  priority=10\n", a)
  
    " Test for ':sign jump' command with groups
    sign jump 5 group=g1 file=Xsign
***************
*** 1128,1141 ****
    sign place 5 group=g2 line=10 name=sign1 priority=25 file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1 priority=30\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1 priority=25\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1 priority=20\n", a)
  
    " Test for :sign place group={group}
    let a = execute('sign place group=g1')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1 priority=20\n", a)
  
    call sign_unplace('*')
    call sign_undefine()
--- 1128,1141 ----
    sign place 5 group=g2 line=10 name=sign1 priority=25 file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  name=sign1  priority=30\n" .
! 	      \ "    line=10  id=5  group=g2  name=sign1  priority=25\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1  priority=20\n", a)
  
    " Test for :sign place group={group}
    let a = execute('sign place group=g1')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
! 	      \ "    line=10  id=5  group=g1  name=sign1  priority=20\n", a)
  
    call sign_unplace('*')
    call sign_undefine()
*** ../vim-8.1.0700/src/version.c	2019-01-06 22:22:03.323843894 +0100
--- src/version.c	2019-01-07 20:43:30.323886492 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     701,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
124. You begin conversations with, "Who is your internet service provider?"

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///