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:
parent
f29b8450e7
commit
1217d5a66d
@ -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
|
||||
zstyles = s;
|
||||
zlstyles = s;
|
||||
s->next = zstyles;
|
||||
zstyles = s;
|
||||
|
||||
return s;
|
||||
}
|
||||
@ -1748,7 +1745,7 @@ static struct builtin bintab[] = {
|
||||
int
|
||||
setup_(UNUSED(Module m))
|
||||
{
|
||||
zstyles = zlstyles = NULL;
|
||||
zstyles = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user