1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-28 15:01:21 +02:00

22650: remove now buggy pointer to last added style

This commit is contained in:
Peter Stephenson 2006-08-20 22:07:06 +00:00
parent f29b8450e7
commit 1217d5a66d
2 changed files with 8 additions and 8 deletions

@ -1,5 +1,8 @@
2006-08-20 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 22650: Src/Modules/zutil.c: when deleting styles, the pointer
to the last style can become invalid.
* 22643: Src/Zle/zle_tricky.c: completion in math context was
broken by searching for multibyte word characters.

@ -54,7 +54,7 @@ struct stypat {
/* List of styles. */
static Style zstyles, zlstyles;
static Style zstyles;
/* Memory stuff. */
@ -117,7 +117,7 @@ freeallstyles(void)
zsfree(s->name);
zfree(s, sizeof(*s));
}
zstyles = zlstyles = NULL;
zstyles = NULL;
}
/* Get the style struct for a name. */
@ -233,11 +233,8 @@ addstyle(char *name)
s->pats = NULL;
s->name = ztrdup(name);
if (zlstyles)
zlstyles->next = s;
else
s->next = zstyles;
zstyles = s;
zlstyles = s;
return s;
}
@ -1748,7 +1745,7 @@ static struct builtin bintab[] = {
int
setup_(UNUSED(Module m))
{
zstyles = zlstyles = NULL;
zstyles = NULL;
return 0;
}