mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.3.024
Problem: Named signs do not use a negative number as intended. Solution: Fix the numbering of named signs. (Xavier de Gaye)
This commit is contained in:
parent
624891f3ef
commit
a4f332b44c
@ -6670,11 +6670,6 @@ ex_sign(eap)
|
|||||||
sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T));
|
sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T));
|
||||||
if (sp == NULL)
|
if (sp == NULL)
|
||||||
return;
|
return;
|
||||||
if (sp_prev == NULL)
|
|
||||||
first_sign = sp;
|
|
||||||
else
|
|
||||||
sp_prev->sn_next = sp;
|
|
||||||
sp->sn_name = vim_strnsave(arg, (int)(p - arg));
|
|
||||||
|
|
||||||
/* If the name is a number use that for the typenr,
|
/* If the name is a number use that for the typenr,
|
||||||
* otherwise use a negative number. */
|
* otherwise use a negative number. */
|
||||||
@ -6687,13 +6682,14 @@ ex_sign(eap)
|
|||||||
|
|
||||||
for (lp = first_sign; lp != NULL; lp = lp->sn_next)
|
for (lp = first_sign; lp != NULL; lp = lp->sn_next)
|
||||||
{
|
{
|
||||||
if (lp->sn_typenr == last_sign_typenr)
|
if (lp->sn_typenr == -last_sign_typenr)
|
||||||
{
|
{
|
||||||
--last_sign_typenr;
|
--last_sign_typenr;
|
||||||
if (last_sign_typenr == 0)
|
if (last_sign_typenr == 0)
|
||||||
last_sign_typenr = MAX_TYPENR;
|
last_sign_typenr = MAX_TYPENR;
|
||||||
if (last_sign_typenr == start)
|
if (last_sign_typenr == start)
|
||||||
{
|
{
|
||||||
|
vim_free(sp);
|
||||||
EMSG(_("E612: Too many signs defined"));
|
EMSG(_("E612: Too many signs defined"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -6702,10 +6698,17 @@ ex_sign(eap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sp->sn_typenr = last_sign_typenr--;
|
sp->sn_typenr = -last_sign_typenr;
|
||||||
if (last_sign_typenr == 0)
|
if (--last_sign_typenr == 0)
|
||||||
last_sign_typenr = MAX_TYPENR; /* wrap around */
|
last_sign_typenr = MAX_TYPENR; /* wrap around */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* add the new sign to the list of signs */
|
||||||
|
if (sp_prev == NULL)
|
||||||
|
first_sign = sp;
|
||||||
|
else
|
||||||
|
sp_prev->sn_next = sp;
|
||||||
|
sp->sn_name = vim_strnsave(arg, (int)(p - arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set values for a defined sign. */
|
/* set values for a defined sign. */
|
||||||
|
@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
24,
|
||||||
/**/
|
/**/
|
||||||
23,
|
23,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user