summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0632
blob: 7c2c0b0984613cdddab40098c5c0e063a9f64c42 (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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0632
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.0632
Problem:    Using sign group names is inefficient.
Solution:   Store group names in a hash table and use a reference to them.
            Also remove unnecessary use of ":exe" from the tests.  (Yegappan
            Lakshmanan, closes #3715)
Files:	    src/buffer.c, src/ex_cmds.c, src/structs.h,
            src/testdir/test_signs.vim


*** ../vim-8.1.0631/src/buffer.c	2018-12-21 15:16:57.475579814 +0100
--- src/buffer.c	2018-12-24 20:15:59.744514267 +0100
***************
*** 5865,5870 ****
--- 5865,5937 ----
  #endif
  
  #if defined(FEAT_SIGNS) || defined(PROTO)
+ static hashtab_T	sg_table;	// sign group (signgroup_T) hashtable
+ 
+ /*
+  * A new sign in group 'groupname' is added. If the group is not present,
+  * create it. Otherwise reference the group.
+  */
+     static signgroup_T *
+ sign_group_ref(char_u *groupname)
+ {
+     static int		initialized = FALSE;
+     hash_T		hash;
+     hashitem_T		*hi;
+     signgroup_T		*group;
+ 
+     if (!initialized)
+     {
+ 	initialized = TRUE;
+ 	hash_init(&sg_table);
+     }
+ 
+     hash = hash_hash(groupname);
+     hi = hash_lookup(&sg_table, groupname, hash);
+     if (HASHITEM_EMPTY(hi))
+     {
+ 	// new group
+ 	group = (signgroup_T *)alloc(
+ 		(unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
+ 	if (group == NULL)
+ 	    return NULL;
+ 	STRCPY(group->sg_name, groupname);
+ 	group->refcount = 1;
+ 	hash_add_item(&sg_table, hi, group->sg_name, hash);
+     }
+     else
+     {
+ 	// existing group
+ 	group = HI2SG(hi);
+ 	group->refcount++;
+     }
+ 
+     return group;
+ }
+ 
+ /*
+  * A sign in group 'groupname' is removed. If all the signs in this group are
+  * removed, then remove the group.
+  */
+     static void
+ sign_group_unref(char_u *groupname)
+ {
+     hashitem_T		*hi;
+     signgroup_T		*group;
+ 
+     hi = hash_find(&sg_table, groupname);
+     if (!HASHITEM_EMPTY(hi))
+     {
+ 	group = HI2SG(hi);
+ 	group->refcount--;
+ 	if (group->refcount == 0)
+ 	{
+ 	    // All the signs in this group are removed
+ 	    hash_remove(&sg_table, hi);
+ 	    vim_free(group);
+ 	}
+     }
+ }
+ 
  /*
   * Insert a new sign into the signlist for buffer 'buf' between the 'prev' and
   * 'next' signs.
***************
*** 5890,5896 ****
  	newsign->lnum = lnum;
  	newsign->typenr = typenr;
  	if (group != NULL)
! 	    newsign->group = vim_strsave(group);
  	else
  	    newsign->group = NULL;
  	newsign->priority = prio;
--- 5957,5970 ----
  	newsign->lnum = lnum;
  	newsign->typenr = typenr;
  	if (group != NULL)
! 	{
! 	    newsign->group = sign_group_ref(group);
! 	    if (newsign->group == NULL)
! 	    {
! 		vim_free(newsign);
! 		return;
! 	    }
! 	}
  	else
  	    newsign->group = NULL;
  	newsign->priority = prio;
***************
*** 5959,5965 ****
      return ((group != NULL && STRCMP(group, "*") == 0) ||
  	    (group == NULL && sign->group == NULL) ||
  	    (group != NULL && sign->group != NULL &&
! 					STRCMP(group, sign->group) == 0));
  }
  
  /*
--- 6033,6039 ----
      return ((group != NULL && STRCMP(group, "*") == 0) ||
  	    (group == NULL && sign->group == NULL) ||
  	    (group != NULL && sign->group != NULL &&
! 				STRCMP(group, sign->group->sg_name) == 0));
  }
  
  /*
***************
*** 5974,5980 ****
  	return NULL;
      dict_add_number(d, "id", sign->id);
      dict_add_string(d, "group", (sign->group == NULL) ?
! 						(char_u *)"" : sign->group);
      dict_add_number(d, "lnum", sign->lnum);
      dict_add_string(d, "name", sign_typenr2name(sign->typenr));
      dict_add_number(d, "priority", sign->priority);
--- 6048,6054 ----
  	return NULL;
      dict_add_number(d, "id", sign->id);
      dict_add_string(d, "group", (sign->group == NULL) ?
! 					(char_u *)"" : sign->group->sg_name);
      dict_add_number(d, "lnum", sign->lnum);
      dict_add_string(d, "name", sign_typenr2name(sign->typenr));
      dict_add_number(d, "priority", sign->priority);
***************
*** 5989,5995 ****
  buf_addsign(
      buf_T	*buf,		// buffer to store sign in
      int		id,		// sign ID
!     char_u	*group,		// sign group
      int		prio,		// sign priority
      linenr_T	lnum,		// line number which gets the mark
      int		typenr)		// typenr of sign we are adding
--- 6063,6069 ----
  buf_addsign(
      buf_T	*buf,		// buffer to store sign in
      int		id,		// sign ID
!     char_u	*groupname,	// sign group
      int		prio,		// sign priority
      linenr_T	lnum,		// line number which gets the mark
      int		typenr)		// typenr of sign we are adding
***************
*** 6001,6007 ****
      FOR_ALL_SIGNS_IN_BUF(buf)
      {
  	if (lnum == sign->lnum && id == sign->id &&
! 		sign_in_group(sign, group))
  	{
  	    // Update an existing sign
  	    sign->typenr = typenr;
--- 6075,6081 ----
      FOR_ALL_SIGNS_IN_BUF(buf)
      {
  	if (lnum == sign->lnum && id == sign->id &&
! 		sign_in_group(sign, groupname))
  	{
  	    // Update an existing sign
  	    sign->typenr = typenr;
***************
*** 6009,6022 ****
  	}
  	else if (lnum < sign->lnum)
  	{
! 	    insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
  	    return;
  	}
  	prev = sign;
      }
  
!     insert_sign_by_lnum_prio(buf, prev, id, group, prio, lnum, typenr);
! 
      return;
  }
  
--- 6083,6096 ----
  	}
  	else if (lnum < sign->lnum)
  	{
! 	    insert_sign_by_lnum_prio(buf, prev, id, groupname, prio,
! 								lnum, typenr);
  	    return;
  	}
  	prev = sign;
      }
  
!     insert_sign_by_lnum_prio(buf, prev, id, groupname, prio, lnum, typenr);
      return;
  }
  
***************
*** 6106,6112 ****
  	    if (next != NULL)
  		next->prev = sign->prev;
  	    lnum = sign->lnum;
! 	    vim_free(sign->group);
  	    vim_free(sign);
  	    // Check whether only one sign needs to be deleted
  	    if (group == NULL || (*group != '*' && id != 0))
--- 6180,6187 ----
  	    if (next != NULL)
  		next->prev = sign->prev;
  	    lnum = sign->lnum;
! 	    if (sign->group != NULL)
! 		sign_group_unref(sign->group->sg_name);
  	    vim_free(sign);
  	    // Check whether only one sign needs to be deleted
  	    if (group == NULL || (*group != '*' && id != 0))
***************
*** 6269,6275 ****
  	    *lastp = next;
  	    if (next != NULL)
  		next->prev = sign->prev;
! 	    vim_free(sign->group);
  	    vim_free(sign);
  	}
  	else
--- 6344,6351 ----
  	    *lastp = next;
  	    if (next != NULL)
  		next->prev = sign->prev;
! 	    if (sign->group != NULL)
! 		sign_group_unref(sign->group->sg_name);
  	    vim_free(sign);
  	}
  	else
***************
*** 6317,6326 ****
  	}
  	FOR_ALL_SIGNS_IN_BUF(buf)
  	{
  	    if (!sign_in_group(sign, sign_group))
  		continue;
  	    if (sign->group != NULL)
! 		vim_snprintf(group, BUFSIZ, "  group=%s", sign->group);
  	    else
  		group[0] = '\0';
  	    vim_snprintf(lbuf, BUFSIZ, _("    line=%ld  id=%d%s  name=%s "
--- 6393,6405 ----
  	}
  	FOR_ALL_SIGNS_IN_BUF(buf)
  	{
+ 	    if (got_int)
+ 		break;
  	    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 "
*** ../vim-8.1.0631/src/ex_cmds.c	2018-12-21 16:04:16.320437461 +0100
--- src/ex_cmds.c	2018-12-24 20:15:59.744514267 +0100
***************
*** 8180,8186 ****
  	{
  	    EMSG2(_("E158: Invalid buffer name: %s"), arg);
  	}
! 	else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
  	{
  	    if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
  		EMSG(_(e_invarg));
--- 8180,8186 ----
  	{
  	    EMSG2(_("E158: Invalid buffer name: %s"), arg);
  	}
! 	else if (id <= 0 && idx == SIGNCMD_PLACE)
  	{
  	    if ((group == NULL) && (lnum >= 0 || sign_name != NULL))
  		EMSG(_(e_invarg));
*** ../vim-8.1.0631/src/structs.h	2018-12-24 00:22:35.739150151 +0100
--- src/structs.h	2018-12-24 20:15:59.744514267 +0100
***************
*** 733,738 ****
--- 733,749 ----
  
  
  #if defined(FEAT_SIGNS) || defined(PROTO)
+ // Sign group
+ typedef struct signgroup_S
+ {
+     short_u	refcount;		// number of signs in this group
+     char_u	sg_name[1];		// sign group name
+ } signgroup_T;
+ 
+ // Macros to get the sign group structure from the group name
+ #define SGN_KEY_OFF	offsetof(signgroup_T, sg_name)
+ #define HI2SG(hi)	((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
+ 
  typedef struct signlist signlist_T;
  
  struct signlist
***************
*** 740,746 ****
      int		id;		/* unique identifier for each placed sign */
      linenr_T	lnum;		/* line number which has this sign */
      int		typenr;		/* typenr of sign */
!     char_u	*group;		/* sign group */
      int		priority;	/* priority for highlighting */
      signlist_T	*next;		/* next signlist entry */
      signlist_T  *prev;		/* previous entry -- for easy reordering */
--- 751,757 ----
      int		id;		/* unique identifier for each placed sign */
      linenr_T	lnum;		/* line number which has this sign */
      int		typenr;		/* typenr of sign */
!     signgroup_T	*group;		/* sign group */
      int		priority;	/* priority for highlighting */
      signlist_T	*next;		/* next signlist entry */
      signlist_T  *prev;		/* previous entry -- for easy reordering */
*** ../vim-8.1.0631/src/testdir/test_signs.vim	2018-12-21 15:16:57.483579762 +0100
--- src/testdir/test_signs.vim	2018-12-24 20:15:59.744514267 +0100
***************
*** 59,65 ****
    redraw
  
    " Check that we can't change sign.
!   call assert_fails("exe 'sign place 40 name=Sign1 buffer=' . bufnr('%')", 'E885:')
  
    " Check placed signs
    let a=execute('sign place')
--- 59,65 ----
    redraw
  
    " Check that we can't change sign.
!   call assert_fails("sign place 40 name=Sign1 buffer=" . bufnr('%'), 'E885:')
  
    " Check placed signs
    let a=execute('sign place')
***************
*** 68,74 ****
    " Unplace the sign and try jumping to it again should fail.
    sign unplace 41
    1
!   call assert_fails("exe 'sign jump 41 buffer=' . bufnr('%')", 'E157:')
    call assert_equal('a', getline('.'))
  
    " Unplace sign on current line.
--- 68,74 ----
    " Unplace the sign and try jumping to it again should fail.
    sign unplace 41
    1
!   call assert_fails("sign jump 41 buffer=" . bufnr('%'), 'E157:')
    call assert_equal('a', getline('.'))
  
    " Unplace sign on current line.
***************
*** 132,148 ****
    sign undefine Sign4
  
    " Error cases
!   call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
    call assert_fails("sign unplace 2 *", 'E474:')
!   call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') a", 'E488:')
!   call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
!   call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
    call assert_fails("sign place 2", 'E474:')
    call assert_fails("sign place abc", 'E474:')
    call assert_fails("sign place 5 line=3", 'E474:')
--- 132,153 ----
    sign undefine Sign4
  
    " Error cases
!   call assert_fails("sign place abc line=3 name=Sign1 buffer=" .
! 			  \ bufnr('%'), 'E474:')
!   call assert_fails("sign unplace abc name=Sign1 buffer=" .
! 			  \ bufnr('%'), 'E474:')
!   call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" .
! 			  \ bufnr('%'), 'E474:')
!   call assert_fails("sign unplace 2abc name=Sign1 buffer=" .
! 			  \ bufnr('%'), 'E474:')
    call assert_fails("sign unplace 2 *", 'E474:')
!   call assert_fails("sign place 1 line=3 name=Sign1 buffer=" .
! 			  \ bufnr('%') . " a", 'E488:')
!   call assert_fails("sign place name=Sign1 buffer=" . bufnr('%'), 'E474:')
!   call assert_fails("sign place line=10 buffer=" . bufnr('%'), 'E474:')
!   call assert_fails("sign unplace 2 line=10 buffer=" . bufnr('%'), 'E474:')
!   call assert_fails("sign unplace 2 name=Sign1 buffer=" . bufnr('%'), 'E474:')
!   call assert_fails("sign place 2 line=3 buffer=" . bufnr('%'), 'E474:')
    call assert_fails("sign place 2", 'E474:')
    call assert_fails("sign place abc", 'E474:')
    call assert_fails("sign place 5 line=3", 'E474:')
***************
*** 157,163 ****
    sign undefine Sign1
    sign undefine Sign2
    sign undefine Sign3
!   call assert_fails("exe 'sign place 41 line=3 name=Sign1 buffer=' . bufnr('%')", 'E155:')
  endfunc
  
  " Undefining placed sign is not recommended.
--- 162,169 ----
    sign undefine Sign1
    sign undefine Sign2
    sign undefine Sign3
!   call assert_fails("sign place 41 line=3 name=Sign1 buffer=" .
! 			  \ bufnr('%'), 'E155:')
  endfunc
  
  " Undefining placed sign is not recommended.
***************
*** 236,268 ****
    call assert_fails('sign place 1 buffer=999', 'E158:')
    call assert_fails('sign define Sign2 text=', 'E239:')
    " Non-numeric identifier for :sign place
!   call assert_fails("exe 'sign place abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Non-numeric identifier for :sign unplace
!   call assert_fails("exe 'sign unplace abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Number followed by an alphabet as sign identifier for :sign place
!   call assert_fails("exe 'sign place 1abc line=3 name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Number followed by an alphabet as sign identifier for :sign unplace
!   call assert_fails("exe 'sign unplace 2abc name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Sign identifier and '*' for :sign unplace
    call assert_fails("sign unplace 2 *", 'E474:')
    " Trailing characters after buffer number for :sign place
!   call assert_fails("exe 'sign place 1 line=3 name=Sign1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
    " Trailing characters after buffer number for :sign unplace
!   call assert_fails("exe 'sign unplace 1 buffer=' . bufnr('%') . 'xxx'", 'E488:')
!   call assert_fails("exe 'sign unplace * buffer=' . bufnr('%') . 'xxx'", 'E488:')
    call assert_fails("sign unplace 1 xxx", 'E474:')
    call assert_fails("sign unplace * xxx", 'E474:')
    call assert_fails("sign unplace xxx", 'E474:')
    " Placing a sign without line number
!   call assert_fails("exe 'sign place name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Placing a sign without sign name
!   call assert_fails("exe 'sign place line=10 buffer=' . bufnr('%')", 'E474:')
    " Unplacing a sign with line number
!   call assert_fails("exe 'sign unplace 2 line=10 buffer=' . bufnr('%')", 'E474:')
    " Unplacing a sign with sign name
!   call assert_fails("exe 'sign unplace 2 name=Sign1 buffer=' . bufnr('%')", 'E474:')
    " Placing a sign without sign name
!   call assert_fails("exe 'sign place 2 line=3 buffer=' . bufnr('%')", 'E474:')
    " Placing a sign with only sign identifier
    call assert_fails("sign place 2", 'E474:')
    " Placing a sign with only a name
--- 242,274 ----
    call assert_fails('sign place 1 buffer=999', 'E158:')
    call assert_fails('sign define Sign2 text=', 'E239:')
    " Non-numeric identifier for :sign place
!   call assert_fails("sign place abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Non-numeric identifier for :sign unplace
!   call assert_fails("sign unplace abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Number followed by an alphabet as sign identifier for :sign place
!   call assert_fails("sign place 1abc line=3 name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Number followed by an alphabet as sign identifier for :sign unplace
!   call assert_fails("sign unplace 2abc name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Sign identifier and '*' for :sign unplace
    call assert_fails("sign unplace 2 *", 'E474:')
    " Trailing characters after buffer number for :sign place
!   call assert_fails("sign place 1 line=3 name=Sign1 buffer=" . bufnr('%') . 'xxx', 'E488:')
    " Trailing characters after buffer number for :sign unplace
!   call assert_fails("sign unplace 1 buffer=" . bufnr('%') . 'xxx', 'E488:')
!   call assert_fails("sign unplace * buffer=" . bufnr('%') . 'xxx', 'E488:')
    call assert_fails("sign unplace 1 xxx", 'E474:')
    call assert_fails("sign unplace * xxx", 'E474:')
    call assert_fails("sign unplace xxx", 'E474:')
    " Placing a sign without line number
!   call assert_fails("sign place name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Placing a sign without sign name
!   call assert_fails("sign place line=10 buffer=" . bufnr('%'), 'E474:')
    " Unplacing a sign with line number
!   call assert_fails("sign unplace 2 line=10 buffer=" . bufnr('%'), 'E474:')
    " Unplacing a sign with sign name
!   call assert_fails("sign unplace 2 name=Sign1 buffer=" . bufnr('%'), 'E474:')
    " Placing a sign without sign name
!   call assert_fails("sign place 2 line=3 buffer=" . bufnr('%'), 'E474:')
    " Placing a sign with only sign identifier
    call assert_fails("sign place 2", 'E474:')
    " Placing a sign with only a name
***************
*** 574,597 ****
    call sign_unplace('*')
  
    " Test for :sign command and groups
!   exe 'sign place 5 line=10 name=sign1 file=' . fname
!   exe 'sign place 5 group=g1 line=10 name=sign1 file=' . fname
!   exe 'sign place 5 group=g2 line=10 name=sign1 file=' . fname
  
    " Test for :sign place group={group} file={fname}
!   let a = execute('sign place file=' . fname)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n    line=10  id=5  name=sign1 priority=10\n", a)
  
!   let a = execute('sign place group=g2 file=' . fname)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n    line=10  id=5  group=g2  name=sign1 priority=10\n", a)
  
!   let a = execute('sign place group=* file=' . fname)
    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)
  
!   let a = execute('sign place group=xyz file=' . fname)
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
  
    call sign_unplace('*')
--- 580,603 ----
    call sign_unplace('*')
  
    " Test for :sign command and groups
!   sign place 5 line=10 name=sign1 file=Xsign
!   sign place 5 group=g1 line=10 name=sign1 file=Xsign
!   sign place 5 group=g2 line=10 name=sign1 file=Xsign
  
    " Test for :sign place group={group} 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)
  
!   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)
  
!   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)
  
!   let a = execute('sign place group=xyz file=Xsign')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n", a)
  
    call sign_unplace('*')
***************
*** 624,645 ****
  	      \ "    line=12  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " Test for :sign unplace
!   exe 'sign unplace 5 group=g2 file=' . fname
    call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
  
    exe 'sign unplace 5 group=g1 buffer=' . bnum
    call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
  
!   exe 'sign unplace 5 group=xy file=' . fname
    call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
  
    " Test for removing all the signs. Place the signs again for this test
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
!   exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
!   exe 'sign place 6 line=20 name=sign1 file=' . fname
!   exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
!   exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
!   exe 'sign unplace 5 group=* file=' . fname
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=20  id=6  name=sign1 priority=10\n" .
--- 630,651 ----
  	      \ "    line=12  id=5  group=g2  name=sign1 priority=10\n", a)
  
    " Test for :sign unplace
!   sign unplace 5 group=g2 file=Xsign
    call assert_equal([], sign_getplaced(bnum, {'group' : 'g2'})[0].signs)
  
    exe 'sign unplace 5 group=g1 buffer=' . bnum
    call assert_equal([], sign_getplaced(bnum, {'group' : 'g1'})[0].signs)
  
!   sign unplace 5 group=xy file=Xsign
    call assert_equal(1, len(sign_getplaced(bnum, {'group' : '*'})[0].signs))
  
    " Test for removing all the signs. Place the signs again for this test
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
!   sign place 5 group=g2 line=12 name=sign1 file=Xsign
!   sign place 6 line=20 name=sign1 file=Xsign
!   sign place 6 group=g1 line=21 name=sign1 file=Xsign
!   sign place 6 group=g2 line=22 name=sign1 file=Xsign
!   sign unplace 5 group=* file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=20  id=6  name=sign1 priority=10\n" .
***************
*** 647,663 ****
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from the global group
!   exe 'sign unplace * file=' . fname
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=21  id=6  group=g1  name=sign1 priority=10\n" .
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from a particular group
!   exe 'sign place 5 line=10 name=sign1 file=' . fname
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
!   exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
!   exe 'sign unplace * group=g1 file=' . fname
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=10  id=5  name=sign1 priority=10\n" .
--- 653,669 ----
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from the global group
!   sign unplace * file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=21  id=6  group=g1  name=sign1 priority=10\n" .
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from a particular group
!   sign place 5 line=10 name=sign1 file=Xsign
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
!   sign place 5 group=g2 line=12 name=sign1 file=Xsign
!   sign unplace * group=g1 file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
  	      \ "    line=10  id=5  name=sign1 priority=10\n" .
***************
*** 665,690 ****
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from all the groups in a file
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
!   exe 'sign place 6 line=20 name=sign1 file=' . fname
!   exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
!   exe 'sign unplace * group=* file=' . fname
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Remove a particular sign id in a group from all the files
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
    sign unplace 5 group=g1
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Remove a particular sign id in all the groups from all the files
!   exe 'sign place 5 line=10 name=sign1 file=' . fname
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
!   exe 'sign place 5 group=g2 line=12 name=sign1 file=' . fname
!   exe 'sign place 6 line=20 name=sign1 file=' . fname
!   exe 'sign place 6 group=g1 line=21 name=sign1 file=' . fname
!   exe 'sign place 6 group=g2 line=22 name=sign1 file=' . fname
    sign unplace 5 group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
--- 671,696 ----
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from all the groups in a file
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
!   sign place 6 line=20 name=sign1 file=Xsign
!   sign place 6 group=g1 line=21 name=sign1 file=Xsign
!   sign unplace * group=* file=Xsign
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Remove a particular sign id in a group from all the files
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
    sign unplace 5 group=g1
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Remove a particular sign id in all the groups from all the files
!   sign place 5 line=10 name=sign1 file=Xsign
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
!   sign place 5 group=g2 line=12 name=sign1 file=Xsign
!   sign place 6 line=20 name=sign1 file=Xsign
!   sign place 6 group=g1 line=21 name=sign1 file=Xsign
!   sign place 6 group=g2 line=22 name=sign1 file=Xsign
    sign unplace 5 group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\nSigns for Xsign:\n" .
***************
*** 693,706 ****
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from all the groups in all the files
!   exe 'sign place 5 line=10 name=sign1 file=' . fname
!   exe 'sign place 5 group=g1 line=11 name=sign1 file=' . fname
    sign unplace * group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Error cases
!   call assert_fails("exe 'sign place 3 group= name=sign1 buffer=' . bnum", 'E474:')
  
    call delete("Xsign")
    call sign_unplace('*')
--- 699,712 ----
  	      \ "    line=22  id=6  group=g2  name=sign1 priority=10\n", a)
  
    " Remove all the signs from all the groups in all the files
!   sign place 5 line=10 name=sign1 file=Xsign
!   sign place 5 group=g1 line=11 name=sign1 file=Xsign
    sign unplace * group=*
    let a = execute('sign place group=*')
    call assert_equal("\n--- Signs ---\n", a)
  
    " Error cases
!   call assert_fails("sign place 3 group= name=sign1 buffer=" . bnum, 'E474:')
  
    call delete("Xsign")
    call sign_unplace('*')
*** ../vim-8.1.0631/src/version.c	2018-12-24 19:15:15.551304134 +0100
--- src/version.c	2018-12-24 20:18:15.011404035 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     632,
  /**/

-- 
The future isn't what it used to be.

 /// 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    ///