summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0384
blob: f48352fc0366245e0a5e1ae24a90531ca2ed3d78 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0384
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.0384
Problem:    Sign ordering depends on +netbeans feature.
Solution:   Also order signs without +netbeans. (Christian Brabandt,
            closes #3224)
Files:	    src/structs.h, src/buffer.c


*** ../vim-8.1.0383/src/structs.h	2018-09-10 21:04:09.872392623 +0200
--- src/structs.h	2018-09-13 18:27:54.241504400 +0200
***************
*** 704,712 ****
      linenr_T	lnum;		/* line number which has this sign */
      int		typenr;		/* typenr of sign */
      signlist_T	*next;		/* next signlist entry */
- # ifdef FEAT_NETBEANS_INTG
      signlist_T  *prev;		/* previous entry -- for easy reordering */
- # endif
  };
  
  /* type argument for buf_getsigntype() */
--- 704,710 ----
*** ../vim-8.1.0383/src/buffer.c	2018-09-10 21:04:09.864392710 +0200
--- src/buffer.c	2018-09-13 18:27:43.673610125 +0200
***************
*** 5856,5866 ****
  	newsign->lnum = lnum;
  	newsign->typenr = typenr;
  	newsign->next = next;
- #ifdef FEAT_NETBEANS_INTG
  	newsign->prev = prev;
  	if (next != NULL)
  	    next->prev = newsign;
- #endif
  
  	if (prev == NULL)
  	{
--- 5856,5864 ----
***************
*** 5905,5942 ****
  	    sign->typenr = typenr;
  	    return;
  	}
! 	else if (
! #ifndef FEAT_NETBEANS_INTG  /* keep signs sorted by lnum */
! 		   id < 0 &&
! #endif
! 			     lnum < sign->lnum)
  	{
! #ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
! 	    /* XXX - GRP: Is this because of sign slide problem? Or is it
! 	     * really needed? Or is it because we allow multiple signs per
! 	     * line? If so, should I add that feature to FEAT_SIGNS?
! 	     */
  	    while (prev != NULL && prev->lnum == lnum)
  		prev = prev->prev;
  	    if (prev == NULL)
  		sign = buf->b_signlist;
  	    else
  		sign = prev->next;
- #endif
  	    insert_sign(buf, prev, sign, id, lnum, typenr);
  	    return;
  	}
  	prev = sign;
      }
! #ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
!     /* XXX - GRP: See previous comment */
      while (prev != NULL && prev->lnum == lnum)
  	prev = prev->prev;
      if (prev == NULL)
  	sign = buf->b_signlist;
      else
  	sign = prev->next;
- #endif
      insert_sign(buf, prev, sign, id, lnum, typenr);
  
      return;
--- 5903,5931 ----
  	    sign->typenr = typenr;
  	    return;
  	}
! 	else if (lnum < sign->lnum)
  	{
! 	    // keep signs sorted by lnum: insert new sign at head of list for
! 	    // this lnum
  	    while (prev != NULL && prev->lnum == lnum)
  		prev = prev->prev;
  	    if (prev == NULL)
  		sign = buf->b_signlist;
  	    else
  		sign = prev->next;
  	    insert_sign(buf, prev, sign, id, lnum, typenr);
  	    return;
  	}
  	prev = sign;
      }
! 
!     // insert new sign at head of list for this lnum
      while (prev != NULL && prev->lnum == lnum)
  	prev = prev->prev;
      if (prev == NULL)
  	sign = buf->b_signlist;
      else
  	sign = prev->next;
      insert_sign(buf, prev, sign, id, lnum, typenr);
  
      return;
***************
*** 6008,6017 ****
  	if (sign->id == id)
  	{
  	    *lastp = next;
- #ifdef FEAT_NETBEANS_INTG
  	    if (next != NULL)
  		next->prev = sign->prev;
- #endif
  	    lnum = sign->lnum;
  	    vim_free(sign);
  	    break;
--- 5997,6004 ----
***************
*** 6067,6073 ****
  
  
  # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
! /* see if a given type of sign exists on a specific line */
      int
  buf_findsigntype_id(
      buf_T	*buf,		/* buffer whose sign we are searching for */
--- 6054,6062 ----
  
  
  # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
! /*
!  * See if a given type of sign exists on a specific line.
!  */
      int
  buf_findsigntype_id(
      buf_T	*buf,		/* buffer whose sign we are searching for */
***************
*** 6085,6091 ****
  
  
  #  if defined(FEAT_SIGN_ICONS) || defined(PROTO)
! /* return the number of icons on the given line */
      int
  buf_signcount(buf_T *buf, linenr_T lnum)
  {
--- 6074,6082 ----
  
  
  #  if defined(FEAT_SIGN_ICONS) || defined(PROTO)
! /*
!  * Return the number of icons on the given line.
!  */
      int
  buf_signcount(buf_T *buf, linenr_T lnum)
  {
*** ../vim-8.1.0383/src/version.c	2018-09-13 18:05:45.291070558 +0200
--- src/version.c	2018-09-13 18:32:47.474574781 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     384,
  /**/

-- 
"Oh, no!  NOT the Spanish Inquisition!"
"NOBODY expects the Spanish Inquisition!!!"
				-- Monty Python sketch --
"Oh, no!  NOT another option!"
"EVERYBODY expects another option!!!"
				-- Discussion in vim-dev mailing list --

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