summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1466
blob: e16db21787c29faa2b93d3eaff4e80e249ddec2e (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1466
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.1466
Problem:    Not updating priority on existing sign.
Solution:   Set the sign priority.  Add a test. (Yegappan Lakshmanan)
Files:	    src/sign.c, src/testdir/test_signs.vim, runtime/doc/eval.txt,
            runtime/doc/sign.txt


*** ../vim-8.1.1465/src/sign.c	2019-05-28 23:08:12.076648654 +0200
--- src/sign.c	2019-06-04 22:37:30.812905921 +0200
***************
*** 330,335 ****
--- 330,336 ----
  	{
  	    // Update an existing sign
  	    sign->typenr = typenr;
+ 	    sign->priority = prio;
  	    return;
  	}
  	else if (lnum < sign->lnum)
*** ../vim-8.1.1465/src/testdir/test_signs.vim	2019-02-17 14:50:22.434125846 +0100
--- src/testdir/test_signs.vim	2019-06-04 22:36:56.981068388 +0200
***************
*** 1183,1188 ****
--- 1183,1206 ----
  	      \ 'priority' : 10}],
  	      \ s[0].signs)
  
+   " Place multiple signs with same id on a line with different priority
+   call sign_place(1, '', 'sign1', 'Xsign',
+ 	      \ {'lnum' : 5, 'priority' : 20})
+   call sign_place(1, '', 'sign2', 'Xsign',
+ 	      \ {'lnum' : 5, 'priority' : 10})
+   let s = sign_getplaced('Xsign', {'lnum' : 5})
+   call assert_equal([
+ 	      \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
+ 	      \ 'priority' : 10}],
+ 	      \ s[0].signs)
+   call sign_place(1, '', 'sign2', 'Xsign',
+ 	      \ {'lnum' : 5, 'priority' : 5})
+   let s = sign_getplaced('Xsign', {'lnum' : 5})
+   call assert_equal([
+ 	      \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
+ 	      \ 'priority' : 5}],
+ 	      \ s[0].signs)
+ 
    " Error case
    call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
  	      \ [])", 'E715:')
*** ../vim-8.1.1465/runtime/doc/eval.txt	2019-06-03 21:14:55.125048909 +0200
--- runtime/doc/eval.txt	2019-06-04 22:39:13.100396410 +0200
***************
*** 8596,8602 ****
  			priority	sign priority
  
  		The returned signs in a buffer are ordered by their line
! 		number.
  
  		Returns an empty list on failure or if there are no placed
  		signs.
--- 8597,8603 ----
  			priority	sign priority
  
  		The returned signs in a buffer are ordered by their line
! 		number and priority.
  
  		Returns an empty list on failure or if there are no placed
  		signs.
*** ../vim-8.1.1465/runtime/doc/sign.txt	2019-05-05 18:11:46.324590615 +0200
--- runtime/doc/sign.txt	2019-06-04 22:40:03.264137888 +0200
***************
*** 182,190 ****
  
  		By default, the sign is assigned a default priority of 10. To
  		assign a different priority value, use "priority={prio}" to
! 		specify a value. The priority is used to determine the
! 		highlight group used when multiple signs are placed on the
! 		same line.
  
  		Examples: >
  			:sign place 5 line=3 name=sign1 file=a.py
--- 182,190 ----
  
  		By default, the sign is assigned a default priority of 10. To
  		assign a different priority value, use "priority={prio}" to
! 		specify a value.  The priority is used to determine the sign
! 		that is displayed when multiple signs are placed on the same
! 		line.
  
  		Examples: >
  			:sign place 5 line=3 name=sign1 file=a.py
***************
*** 204,210 ****
  		it (e.g., when the debugger has stopped at a breakpoint).
  
  		The optional "group={group}" attribute can be used before
! 		"file=" to select a sign in a particular group.
  
  :sign place {id} name={name} [buffer={nr}]
  		Same, but use buffer {nr}.  If the buffer argument is not
--- 204,212 ----
  		it (e.g., when the debugger has stopped at a breakpoint).
  
  		The optional "group={group}" attribute can be used before
! 		"file=" to select a sign in a particular group.  The optional
! 		"priority={prio}" attribute can be used to change the priority
! 		of an existing sign.
  
  :sign place {id} name={name} [buffer={nr}]
  		Same, but use buffer {nr}.  If the buffer argument is not
*** ../vim-8.1.1465/src/version.c	2019-06-04 22:29:06.931288432 +0200
--- src/version.c	2019-06-04 22:38:49.112518143 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1466,
  /**/

-- 
From "know your smileys":
 @:-()	Elvis Presley

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