mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-12 07:40:53 +01:00
34623: free history more often if "remetafying"
This commit is contained in:
parent
ed43cf2768
commit
c96606cc06
2 changed files with 10 additions and 2 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2015-02-23 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
* 34623: Src/hist.c: free history more often in previous case.
|
||||||
|
|
||||||
2015-02-23 Mikael Magnusson <mikachu@gmail.com>
|
2015-02-23 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
* 34615 + 34619: Src/hist.c: Remeta one frame earlier
|
* 34615 + 34619: Src/hist.c: Remeta one frame earlier
|
||||||
|
|
|
||||||
|
|
@ -2593,8 +2593,6 @@ readhistfile(char *fn, int err, int readflags)
|
||||||
start = pt;
|
start = pt;
|
||||||
uselex = isset(HISTLEXWORDS) && !(readflags & HFILE_FAST);
|
uselex = isset(HISTLEXWORDS) && !(readflags & HFILE_FAST);
|
||||||
histsplitwords(pt, &words, &nwords, &nwordpos, uselex);
|
histsplitwords(pt, &words, &nwords, &nwordpos, uselex);
|
||||||
if (uselex)
|
|
||||||
freeheap();
|
|
||||||
|
|
||||||
he->nwords = nwordpos/2;
|
he->nwords = nwordpos/2;
|
||||||
if (he->nwords) {
|
if (he->nwords) {
|
||||||
|
|
@ -2607,6 +2605,12 @@ readhistfile(char *fn, int err, int readflags)
|
||||||
freehistnode(&he->node);
|
freehistnode(&he->node);
|
||||||
curhist--;
|
curhist--;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Do this last out of paranoia in case use of
|
||||||
|
* heap is disguised...
|
||||||
|
*/
|
||||||
|
if (uselex || remeta)
|
||||||
|
freeheap();
|
||||||
}
|
}
|
||||||
if (start && readflags & HFILE_USE_OPTIONS) {
|
if (start && readflags & HFILE_USE_OPTIONS) {
|
||||||
zsfree(lasthist.text);
|
zsfree(lasthist.text);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue