summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drawline.c13
-rw-r--r--src/globals.h2
-rw-r--r--src/netbeans.c44
-rw-r--r--src/sign.c314
-rw-r--r--src/structs.h35
-rw-r--r--src/version.c2
6 files changed, 206 insertions, 204 deletions
diff --git a/src/drawline.c b/src/drawline.c
index ac3792842..869bdaa0e 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -121,9 +121,9 @@ get_sign_display_info(
#endif
)
{
- text_sign = (sattr->text != NULL) ? sattr->typenr : 0;
+ text_sign = (sattr->sat_text != NULL) ? sattr->sat_typenr : 0;
# ifdef FEAT_SIGN_ICONS
- icon_sign = (sattr->icon != NULL) ? sattr->typenr : 0;
+ icon_sign = (sattr->sat_icon != NULL) ? sattr->sat_typenr : 0;
if (gui.in_use && icon_sign != 0)
{
// Use the image in this position.
@@ -158,7 +158,7 @@ get_sign_display_info(
# endif
if (text_sign != 0)
{
- *pp_extra = sattr->text;
+ *pp_extra = sattr->sat_text;
if (*pp_extra != NULL)
{
if (nrcol)
@@ -176,7 +176,7 @@ get_sign_display_info(
*c_finalp = NUL;
*n_extrap = (int)STRLEN(*pp_extra);
}
- *char_attrp = sattr->texthl;
+ *char_attrp = sattr->sat_texthl;
}
}
}
@@ -597,7 +597,8 @@ win_line(
}
// Check if the character under the cursor should not be inverted
- if (!highlight_match && lnum == curwin->w_cursor.lnum && wp == curwin
+ if (!highlight_match && lnum == curwin->w_cursor.lnum
+ && wp == curwin
#ifdef FEAT_GUI
&& !gui.in_use
#endif
@@ -677,7 +678,7 @@ win_line(
# ifdef FEAT_SIGNS
// If this line has a sign with line highlighting set line_attr.
if (sign_present)
- line_attr = sattr.linehl;
+ line_attr = sattr.sat_linehl;
# endif
# if defined(FEAT_QUICKFIX)
// Highlight the current line in the quickfix window.
diff --git a/src/globals.h b/src/globals.h
index 3f883d1cf..d2c1e3385 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -676,7 +676,7 @@ EXTERN buf_T *curbuf INIT(= NULL); // currently active buffer
// Iterate through all the signs placed in a buffer
#define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
- for (sign = buf->b_signlist; sign != NULL; sign = sign->next)
+ for (sign = buf->b_signlist; sign != NULL; sign = sign->se_next)
// Flag that is set when switching off 'swapfile'. It means that all blocks
// are to be loaded into memory. Shouldn't be global...
diff --git a/src/netbeans.c b/src/netbeans.c
index 9a34460aa..98714d399 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -2977,16 +2977,16 @@ netbeans_deleted_all_lines(buf_T *bufp)
int
netbeans_is_guarded(linenr_T top, linenr_T bot)
{
- signlist_T *p;
- int lnum;
+ sign_entry_T *p;
+ int lnum;
if (!NETBEANS_OPEN)
return FALSE;
- for (p = curbuf->b_signlist; p != NULL; p = p->next)
- if (p->id >= GUARDEDOFFSET)
+ for (p = curbuf->b_signlist; p != NULL; p = p->se_next)
+ if (p->se_id >= GUARDEDOFFSET)
for (lnum = top + 1; lnum < bot; lnum++)
- if (lnum == p->lnum)
+ if (lnum == p->se_lnum)
return TRUE;
return FALSE;
@@ -3091,36 +3091,36 @@ netbeans_draw_multisign_indicator(int row)
void
netbeans_gutter_click(linenr_T lnum)
{
- signlist_T *p;
+ sign_entry_T *p;
if (!NETBEANS_OPEN)
return;
- for (p = curbuf->b_signlist; p != NULL; p = p->next)
+ for (p = curbuf->b_signlist; p != NULL; p = p->se_next)
{
- if (p->lnum == lnum && p->next && p->next->lnum == lnum)
+ if (p->se_lnum == lnum && p->se_next && p->se_next->se_lnum == lnum)
{
- signlist_T *tail;
+ sign_entry_T *tail;
/* remove "p" from list, reinsert it at the tail of the sublist */
- if (p->prev)
- p->prev->next = p->next;
+ if (p->se_prev)
+ p->se_prev->se_next = p->se_next;
else
- curbuf->b_signlist = p->next;
- p->next->prev = p->prev;
+ curbuf->b_signlist = p->se_next;
+ p->se_next->se_prev = p->se_prev;
/* now find end of sublist and insert p */
- for (tail = p->next;
- tail->next && tail->next->lnum == lnum
- && tail->next->id < GUARDEDOFFSET;
- tail = tail->next)
+ for (tail = p->se_next;
+ tail->se_next && tail->se_next->se_lnum == lnum
+ && tail->se_next->se_id < GUARDEDOFFSET;
+ tail = tail->se_next)
;
/* tail now points to last entry with same lnum (except
* that "guarded" annotations are always last) */
- p->next = tail->next;
- if (tail->next)
- tail->next->prev = p;
- p->prev = tail;
- tail->next = p;
+ p->se_next = tail->se_next;
+ if (tail->se_next)
+ tail->se_next->se_prev = p;
+ p->se_prev = tail;
+ tail->se_next = p;
update_debug_sign(curbuf, lnum);
break;
}
diff --git a/src/sign.c b/src/sign.c
index 73951317e..ddf2ac6a2 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -89,15 +89,15 @@ sign_group_ref(char_u *groupname)
if (group == NULL)
return NULL;
STRCPY(group->sg_name, groupname);
- group->refcount = 1;
- group->next_sign_id = 1;
+ group->sg_refcount = 1;
+ group->sg_next_sign_id = 1;
hash_add_item(&sg_table, hi, group->sg_name, hash);
}
else
{
// existing group
group = HI2SG(hi);
- group->refcount++;
+ group->sg_refcount++;
}
return group;
@@ -117,8 +117,8 @@ sign_group_unref(char_u *groupname)
if (!HASHITEM_EMPTY(hi))
{
group = HI2SG(hi);
- group->refcount--;
- if (group->refcount == 0)
+ group->sg_refcount--;
+ if (group->sg_refcount == 0)
{
// All the signs in this group are removed
hash_remove(&sg_table, hi);
@@ -129,16 +129,16 @@ sign_group_unref(char_u *groupname)
/*
* Returns TRUE if 'sign' is in 'group'.
- * A sign can either be in the global group (sign->group == NULL)
+ * A sign can either be in the global group (sign->se_group == NULL)
* or in a named group. If 'group' is '*', then the sign is part of the group.
*/
static int
-sign_in_group(signlist_T *sign, char_u *group)
+sign_in_group(sign_entry_T *sign, char_u *group)
{
return ((group != NULL && STRCMP(group, "*") == 0)
- || (group == NULL && sign->group == NULL)
- || (group != NULL && sign->group != NULL
- && STRCMP(group, sign->group->sg_name) == 0));
+ || (group == NULL && sign->se_group == NULL)
+ || (group != NULL && sign->se_group != NULL
+ && STRCMP(group, sign->se_group->sg_name) == 0));
}
/*
@@ -149,7 +149,7 @@ sign_group_get_next_signid(buf_T *buf, char_u *groupname)
{
int id = 1;
signgroup_T *group = NULL;
- signlist_T *sign;
+ sign_entry_T *sign;
hashitem_T *hi;
int found = FALSE;
@@ -167,13 +167,13 @@ sign_group_get_next_signid(buf_T *buf, char_u *groupname)
if (group == NULL)
id = next_sign_id++; // global group
else
- id = group->next_sign_id++;
+ id = group->sg_next_sign_id++;
// Check whether this sign is already placed in the buffer
found = TRUE;
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (id == sign->id && sign_in_group(sign, groupname))
+ if (id == sign->se_id && sign_in_group(sign, groupname))
{
found = FALSE; // sign identifier is in use
break;
@@ -191,38 +191,38 @@ sign_group_get_next_signid(buf_T *buf, char_u *groupname)
static void
insert_sign(
buf_T *buf, // buffer to store sign in
- signlist_T *prev, // previous sign entry
- signlist_T *next, // next sign entry
+ sign_entry_T *prev, // previous sign entry
+ sign_entry_T *next, // next sign entry
int id, // sign ID
char_u *group, // sign group; NULL for global group
int prio, // sign priority
linenr_T lnum, // line number which gets the mark
int typenr) // typenr of sign we are adding
{
- signlist_T *newsign;
+ sign_entry_T *newsign;
- newsign = lalloc_id(sizeof(signlist_T), FALSE, aid_insert_sign);
+ newsign = lalloc_id(sizeof(sign_entry_T), FALSE, aid_insert_sign);
if (newsign != NULL)
{
- newsign->id = id;
- newsign->lnum = lnum;
- newsign->typenr = typenr;
+ newsign->se_id = id;
+ newsign->se_lnum = lnum;
+ newsign->se_typenr = typenr;
if (group != NULL)
{
- newsign->group = sign_group_ref(group);
- if (newsign->group == NULL)
+ newsign->se_group = sign_group_ref(group);
+ if (newsign->se_group == NULL)
{
vim_free(newsign);
return;
}
}
else
- newsign->group = NULL;
- newsign->priority = prio;
- newsign->next = next;
- newsign->prev = prev;
+ newsign->se_group = NULL;
+ newsign->se_priority = prio;
+ newsign->se_next = next;
+ newsign->se_prev = prev;
if (next != NULL)
- next->prev = newsign;
+ next->se_prev = newsign;
if (prev == NULL)
{
@@ -242,7 +242,7 @@ insert_sign(
#endif
}
else
- prev->next = newsign;
+ prev->se_next = newsign;
}
}
@@ -252,23 +252,23 @@ insert_sign(
static void
insert_sign_by_lnum_prio(
buf_T *buf, // buffer to store sign in
- signlist_T *prev, // previous sign entry
+ sign_entry_T *prev, // previous sign entry
int id, // sign ID
char_u *group, // sign group; NULL for global group
int prio, // sign priority
linenr_T lnum, // line number which gets the mark
int typenr) // typenr of sign we are adding
{
- signlist_T *sign;
+ sign_entry_T *sign;
// keep signs sorted by lnum and by priority: insert new sign at
// the proper position in the list for this lnum.
- while (prev != NULL && prev->lnum == lnum && prev->priority <= prio)
- prev = prev->prev;
+ while (prev != NULL && prev->se_lnum == lnum && prev->se_priority <= prio)
+ prev = prev->se_prev;
if (prev == NULL)
sign = buf->b_signlist;
else
- sign = prev->next;
+ sign = prev->se_next;
insert_sign(buf, prev, sign, id, group, prio, lnum, typenr);
}
@@ -305,18 +305,18 @@ sign_typenr2name(int typenr)
* Return information about a sign in a Dict
*/
static dict_T *
-sign_get_info(signlist_T *sign)
+sign_get_info(sign_entry_T *sign)
{
dict_T *d;
if ((d = dict_alloc_id(aid_sign_getinfo)) == NULL)
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);
+ dict_add_number(d, "id", sign->se_id);
+ dict_add_string(d, "group", (sign->se_group == NULL) ?
+ (char_u *)"" : sign->se_group->sg_name);
+ dict_add_number(d, "lnum", sign->se_lnum);
+ dict_add_string(d, "name", sign_typenr2name(sign->se_typenr));
+ dict_add_number(d, "priority", sign->se_priority);
return d;
}
@@ -327,18 +327,18 @@ sign_get_info(signlist_T *sign)
* buffer are sorted by line number and priority.
*/
static void
-sign_sort_by_prio_on_line(buf_T *buf, signlist_T *sign)
+sign_sort_by_prio_on_line(buf_T *buf, sign_entry_T *sign)
{
- signlist_T *p = NULL;
+ sign_entry_T *p = NULL;
// If there is only one sign in the buffer or only one sign on the line or
// the sign is already sorted by priority, then return.
- if ((sign->prev == NULL
- || sign->prev->lnum != sign->lnum
- || sign->prev->priority > sign->priority)
- && (sign->next == NULL
- || sign->next->lnum != sign->lnum
- || sign->next->priority < sign->priority))
+ if ((sign->se_prev == NULL
+ || sign->se_prev->se_lnum != sign->se_lnum
+ || sign->se_prev->se_priority > sign->se_priority)
+ && (sign->se_next == NULL
+ || sign->se_next->se_lnum != sign->se_lnum
+ || sign->se_next->se_priority < sign->se_priority))
return;
// One or more signs on the same line as 'sign'
@@ -346,50 +346,50 @@ sign_sort_by_prio_on_line(buf_T *buf, signlist_T *sign)
// First search backward for a sign with higher priority on the same line
p = sign;
- while (p->prev != NULL && p->prev->lnum == sign->lnum
- && p->prev->priority <= sign->priority)
- p = p->prev;
+ while (p->se_prev != NULL && p->se_prev->se_lnum == sign->se_lnum
+ && p->se_prev->se_priority <= sign->se_priority)
+ p = p->se_prev;
if (p == sign)
{
// Sign not found. Search forward for a sign with priority just before
// 'sign'.
- p = sign->next;
- while (p->next != NULL && p->next->lnum == sign->lnum
- && p->next->priority > sign->priority)
- p = p->next;
+ p = sign->se_next;
+ while (p->se_next != NULL && p->se_next->se_lnum == sign->se_lnum
+ && p->se_next->se_priority > sign->se_priority)
+ p = p->se_next;
}
// Remove 'sign' from the list
if (buf->b_signlist == sign)
- buf->b_signlist = sign->next;
- if (sign->prev != NULL)
- sign->prev->next = sign->next;
- if (sign->next != NULL)
- sign->next->prev = sign->prev;
- sign->prev = NULL;
- sign->next = NULL;
+ buf->b_signlist = sign->se_next;
+ if (sign->se_prev != NULL)
+ sign->se_prev->se_next = sign->se_next;
+ if (sign->se_next != NULL)
+ sign->se_next->se_prev = sign->se_prev;
+ sign->se_prev = NULL;
+ sign->se_next = NULL;
// Re-insert 'sign' at the right place
- if (p->priority <= sign->priority)
+ if (p->se_priority <= sign->se_priority)
{
// 'sign' has a higher priority and should be inserted before 'p'
- sign->prev = p->prev;
- sign->next = p;
- p->prev = sign;
- if (sign->prev != NULL)
- sign->prev->next = sign;
+ sign->se_prev = p->se_prev;
+ sign->se_next = p;
+ p->se_prev = sign;
+ if (sign->se_prev != NULL)
+ sign->se_prev->se_next = sign;
if (buf->b_signlist == p)
buf->b_signlist = sign;
}
else
{
// 'sign' has a lower priority and should be inserted after 'p'
- sign->prev = p;
- sign->next = p->next;
- p->next = sign;
- if (sign->next != NULL)
- sign->next->prev = sign;
+ sign->se_prev = p;
+ sign->se_next = p->se_next;
+ p->se_next = sign;
+ if (sign->se_next != NULL)
+ sign->se_next->se_prev = sign;
}
}
@@ -405,22 +405,22 @@ buf_addsign(
linenr_T lnum, // line number which gets the mark
int typenr) // typenr of sign we are adding
{
- signlist_T *sign; // a sign in the signlist
- signlist_T *prev; // the previous sign
+ sign_entry_T *sign; // a sign in the signlist
+ sign_entry_T *prev; // the previous sign
prev = NULL;
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (lnum == sign->lnum && id == sign->id
+ if (lnum == sign->se_lnum && id == sign->se_id
&& sign_in_group(sign, groupname))
{
// Update an existing sign
- sign->typenr = typenr;
- sign->priority = prio;
+ sign->se_typenr = typenr;
+ sign->se_priority = prio;
sign_sort_by_prio_on_line(buf, sign);
return;
}
- else if (lnum < sign->lnum)
+ else if (lnum < sign->se_lnum)
{
insert_sign_by_lnum_prio(buf, prev, id, groupname, prio,
lnum, typenr);
@@ -445,16 +445,16 @@ buf_change_sign_type(
int typenr, // typenr of sign we are adding
int prio) // sign priority
{
- signlist_T *sign; // a sign in the signlist
+ sign_entry_T *sign; // a sign in the signlist
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (sign->id == markId && sign_in_group(sign, group))
+ if (sign->se_id == markId && sign_in_group(sign, group))
{
- sign->typenr = typenr;
- sign->priority = prio;
+ sign->se_typenr = typenr;
+ sign->se_priority = prio;
sign_sort_by_prio_on_line(buf, sign);
- return sign->lnum;
+ return sign->se_lnum;
}
}
@@ -469,33 +469,33 @@ buf_change_sign_type(
int
buf_get_signattrs(buf_T *buf, linenr_T lnum, sign_attrs_T *sattr)
{
- signlist_T *sign;
- sign_T *sp;
+ sign_entry_T *sign;
+ sign_T *sp;
vim_memset(sattr, 0, sizeof(sign_attrs_T));
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (sign->lnum > lnum)
+ if (sign->se_lnum > lnum)
// Signs are sorted by line number in the buffer. No need to check
// for signs after the specified line number 'lnum'.
break;
- if (sign->lnum == lnum)
+ if (sign->se_lnum == lnum)
{
- sattr->typenr = sign->typenr;
- sp = find_sign_by_typenr(sign->typenr);
+ sattr->sat_typenr = sign->se_typenr;
+ sp = find_sign_by_typenr(sign->se_typenr);
if (sp == NULL)
return FALSE;
# ifdef FEAT_SIGN_ICONS
- sattr->icon = sp->sn_image;
+ sattr->sat_icon = sp->sn_image;
# endif
- sattr->text = sp->sn_text;
- if (sattr->text != NULL && sp->sn_text_hl > 0)
- sattr->texthl = syn_id2attr(sp->sn_text_hl);
+ sattr->sat_text = sp->sn_text;
+ if (sattr->sat_text != NULL && sp->sn_text_hl > 0)
+ sattr->sat_texthl = syn_id2attr(sp->sn_text_hl);
if (sp->sn_line_hl > 0)
- sattr->linehl = syn_id2attr(sp->sn_line_hl);
+ sattr->sat_linehl = syn_id2attr(sp->sn_line_hl);
return TRUE;
}
}
@@ -519,27 +519,27 @@ buf_delsign(
int id, // sign id
char_u *group) // sign group
{
- signlist_T **lastp; // pointer to pointer to current sign
- signlist_T *sign; // a sign in a b_signlist
- signlist_T *next; // the next sign in a b_signlist
- linenr_T lnum; // line number whose sign was deleted
+ sign_entry_T **lastp; // pointer to pointer to current sign
+ sign_entry_T *sign; // a sign in a b_signlist
+ sign_entry_T *next; // the next sign in a b_signlist
+ linenr_T lnum; // line number whose sign was deleted
lastp = &buf->b_signlist;
lnum = 0;
for (sign = buf->b_signlist; sign != NULL; sign = next)
{
- next = sign->next;
- if ((id == 0 || sign->id == id)
- && (atlnum == 0 || sign->lnum == atlnum)
+ next = sign->se_next;
+ if ((id == 0 || sign->se_id == id)
+ && (atlnum == 0 || sign->se_lnum == atlnum)
&& sign_in_group(sign, group))
{
*lastp = next;
if (next != NULL)
- next->prev = sign->prev;
- lnum = sign->lnum;
- if (sign->group != NULL)
- sign_group_unref(sign->group->sg_name);
+ next->se_prev = sign->se_prev;
+ lnum = sign->se_lnum;
+ if (sign->se_group != NULL)
+ sign_group_unref(sign->se_group->sg_name);
vim_free(sign);
redraw_buf_line_later(buf, lnum);
@@ -553,7 +553,7 @@ buf_delsign(
break;
}
else
- lastp = &sign->next;
+ lastp = &sign->se_next;
}
// When deleting the last sign the cursor position may change, because the
@@ -579,11 +579,11 @@ buf_findsign(
int id, // sign ID
char_u *group) // sign group
{
- signlist_T *sign; // a sign in the signlist
+ sign_entry_T *sign; // a sign in the signlist
FOR_ALL_SIGNS_IN_BUF(buf, sign)
- if (sign->id == id && sign_in_group(sign, group))
- return sign->lnum;
+ if (sign->se_id == id && sign_in_group(sign, group))
+ return sign->se_lnum;
return 0;
}
@@ -592,22 +592,22 @@ buf_findsign(
* Return the sign at line 'lnum' in buffer 'buf'. Returns NULL if a sign is
* not found at the line. If 'groupname' is NULL, searches in the global group.
*/
- static signlist_T *
+ static sign_entry_T *
buf_getsign_at_line(
buf_T *buf, // buffer whose sign we are searching for
linenr_T lnum, // line number of sign
char_u *groupname) // sign group name
{
- signlist_T *sign; // a sign in the signlist
+ sign_entry_T *sign; // a sign in the signlist
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (sign->lnum > lnum)
+ if (sign->se_lnum > lnum)
// Signs are sorted by line number in the buffer. No need to check
// for signs after the specified line number 'lnum'.
break;
- if (sign->lnum == lnum && sign_in_group(sign, groupname))
+ if (sign->se_lnum == lnum && sign_in_group(sign, groupname))
return sign;
}
@@ -623,11 +623,11 @@ buf_findsign_id(
linenr_T lnum, // line number of sign
char_u *groupname) // sign group name
{
- signlist_T *sign; // a sign in the signlist
+ sign_entry_T *sign; // a sign in the signlist
sign = buf_getsign_at_line(buf, lnum, groupname);
if (sign != NULL)
- return sign->id;
+ return sign->se_id;
return 0;
}
@@ -642,17 +642,17 @@ buf_findsigntype_id(
linenr_T lnum, // line number of sign
int typenr) // sign type number
{
- signlist_T *sign; // a sign in the signlist
+ sign_entry_T *sign; // a sign in the signlist
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (sign->lnum > lnum)
+ if (sign->se_lnum > lnum)
// Signs are sorted by line number in the buffer. No need to check
// for signs after the specified line number 'lnum'.
break;
- if (sign->lnum == lnum && sign->typenr == typenr)
- return sign->id;
+ if (sign->se_lnum == lnum && sign->se_typenr == typenr)
+ return sign->se_id;
}
return 0;
@@ -666,18 +666,18 @@ buf_findsigntype_id(
int
buf_signcount(buf_T *buf, linenr_T lnum)
{
- signlist_T *sign; // a sign in the signlist
- int count = 0;
+ sign_entry_T *sign; // a sign in the signlist
+ int count = 0;
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
- if (sign->lnum > lnum)
+ if (sign->se_lnum > lnum)
// Signs are sorted by line number in the buffer. No need to check
// for signs after the specified line number 'lnum'.
break;
- if (sign->lnum == lnum)
- if (sign_get_image(sign->typenr) != NULL)
+ if (sign->se_lnum == lnum)
+ if (sign_get_image(sign->se_typenr) != NULL)
count++;
}
@@ -693,9 +693,9 @@ buf_signcount(buf_T *buf, linenr_T lnum)
void
buf_delete_signs(buf_T *buf, char_u *group)
{
- signlist_T *sign;
- signlist_T **lastp; // pointer to pointer to current sign
- signlist_T *next;
+ sign_entry_T *sign;
+ sign_entry_T **lastp; // pointer to pointer to current sign
+ sign_entry_T *next;
// When deleting the last sign need to redraw the windows to remove the
// sign column. Not when curwin is NULL (this means we're exiting).
@@ -708,18 +708,18 @@ buf_delete_signs(buf_T *buf, char_u *group)
lastp = &buf->b_signlist;
for (sign = buf->b_signlist; sign != NULL; sign = next)
{
- next = sign->next;
+ next = sign->se_next;
if (sign_in_group(sign, group))
{
*lastp = next;
if (next != NULL)
- next->prev = sign->prev;
- if (sign->group != NULL)
- sign_group_unref(sign->group->sg_name);
+ next->se_prev = sign->se_prev;
+ if (sign->se_group != NULL)
+ sign_group_unref(sign->se_group->sg_name);
vim_free(sign);
}
else
- lastp = &sign->next;
+ lastp = &sign->se_next;
}
}
@@ -729,10 +729,10 @@ buf_delete_signs(buf_T *buf, char_u *group)
static void
sign_list_placed(buf_T *rbuf, char_u *sign_group)
{
- buf_T *buf;
- signlist_T *sign;
- char lbuf[MSG_BUF_LEN];
- char group[MSG_BUF_LEN];
+ buf_T *buf;
+ sign_entry_T *sign;
+ char lbuf[MSG_BUF_LEN];
+ char group[MSG_BUF_LEN];
msg_puts_title(_("\n--- Signs ---"));
msg_putchar('\n');
@@ -754,15 +754,15 @@ sign_list_placed(buf_T *rbuf, char_u *sign_group)
break;
if (!sign_in_group(sign, sign_group))
continue;
- if (sign->group != NULL)
+ if (sign->se_group != NULL)
vim_snprintf(group, MSG_BUF_LEN, _(" group=%s"),
- sign->group->sg_name);
+ sign->se_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);
+ (long)sign->se_lnum, sign->se_id, group,
+ sign_typenr2name(sign->se_typenr), sign->se_priority);
msg_puts(lbuf);
msg_putchar('\n');
}
@@ -782,21 +782,21 @@ sign_mark_adjust(
long amount,
long amount_after)
{
- signlist_T *sign; // a sign in a b_signlist
- linenr_T new_lnum;
+ sign_entry_T *sign; // a sign in a b_signlist
+ linenr_T new_lnum;
FOR_ALL_SIGNS_IN_BUF(curbuf, sign)
{
// Ignore changes to lines after the sign
- if (sign->lnum < line1)
+ if (sign->se_lnum < line1)
continue;
- new_lnum = sign->lnum;
- if (sign->lnum >= line1 && sign->lnum <= line2)
+ new_lnum = sign->se_lnum;
+ if (sign->se_lnum >= line1 && sign->se_lnum <= line2)
{
if (amount != MAXLNUM)
new_lnum += amount;
}
- else if (sign->lnum > line2)
+ else if (sign->se_lnum > line2)
// Lines inserted or deleted before the sign
new_lnum += amount_after;
@@ -804,7 +804,7 @@ sign_mark_adjust(
// then don't adjust the line number. Otherwise, it will always be past
// the last line and will not be visible.
if (new_lnum <= curbuf->b_ml.ml_line_count)
- sign->lnum = new_lnum;
+ sign->se_lnum = new_lnum;
}
}
@@ -1694,8 +1694,8 @@ sign_getlist(char_u *name, list_T *retlist)
void
get_buffer_signs(buf_T *buf, list_T *l)
{
- signlist_T *sign;
- dict_T *d;
+ sign_entry_T *sign;
+ dict_T *d;
FOR_ALL_SIGNS_IN_BUF(buf, sign)
{
@@ -1715,10 +1715,10 @@ sign_get_placed_in_buf(
char_u *sign_group,
list_T *retlist)
{
- dict_T *d;
- list_T *l;
- signlist_T *sign;
- dict_T *sdict;
+ dict_T *d;
+ list_T *l;
+ sign_entry_T *sign;
+ dict_T *sdict;
if ((d = dict_alloc_id(aid_sign_getplaced_dict)) == NULL)
return;
@@ -1735,9 +1735,9 @@ sign_get_placed_in_buf(
if (!sign_in_group(sign, sign_group))
continue;
if ((lnum == 0 && sign_id == 0)
- || (sign_id == 0 && lnum == sign->lnum)
- || (lnum == 0 && sign_id == sign->id)
- || (lnum == sign->lnum && sign_id == sign->id))
+ || (sign_id == 0 && lnum == sign->se_lnum)
+ || (lnum == 0 && sign_id == sign->se_id)
+ || (lnum == sign->se_lnum && sign_id == sign->se_id))
{
if ((sdict = sign_get_info(sign)) != NULL)
list_append_dict(l, sdict);
diff --git a/src/structs.h b/src/structs.h
index 9cc245252..265f0c4f3 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -771,33 +771,32 @@ typedef struct proptype_S
// Sign group
typedef struct signgroup_S
{
- int next_sign_id; // next sign id for this group
- short_u refcount; // number of signs in this group
+ int sg_next_sign_id; // next sign id for this group
+ short_u sg_refcount; // number of signs in this group
char_u sg_name[1]; // sign group name, actually longer
} signgroup_T;
-typedef struct signlist signlist_T;
-
-struct signlist
+typedef struct sign_entry sign_entry_T;
+struct sign_entry
{
- 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
+ int se_id; // unique identifier for each placed sign
+ linenr_T se_lnum; // line number which has this sign
+ int se_typenr; // typenr of sign
+ signgroup_T *se_group; // sign group
+ int se_priority; // priority for highlighting
+ sign_entry_T *se_next; // next entry in a list of signs
+ sign_entry_T *se_prev; // previous entry -- for easy reordering
};
/*
* Sign attributes. Used by the screen refresh routines.
*/
typedef struct sign_attrs_S {
- int typenr;
- void *icon;
- char_u *text;
- int texthl;
- int linehl;
+ int sat_typenr;
+ void *sat_icon;
+ char_u *sat_text;
+ int sat_texthl;
+ int sat_linehl;
} sign_attrs_T;
#if defined(FEAT_SIGNS) || defined(PROTO)
@@ -2675,7 +2674,7 @@ struct file_buffer
#endif
#ifdef FEAT_SIGNS
- signlist_T *b_signlist; // list of signs to draw
+ sign_entry_T *b_signlist; // list of placed signs
# ifdef FEAT_NETBEANS_INTG
int b_has_sign_column; // Flag that is set when a first sign is
// added and remains set until the end of
diff --git a/src/version.c b/src/version.c
index 09e8ad3dc..057ab74a8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2205,
+/**/
2204,
/**/
2203,