Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Crash in copy-earlier-word
- X-seq: zsh-workers 21910
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Crash in copy-earlier-word
- Date: Sun, 23 Oct 2005 20:38:37 +0100
- In-reply-to: <237967ef0510220929p651a40b5od5741245092394a1@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0510220929p651a40b5od5741245092394a1@xxxxxxxxxxxxxx>
On Sat, 22 Oct 2005 18:29:04 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> If i type a few words and then press copy-earlier-word a few times, i
> get this backtrace. seems to be at or after it reaches the first word
> on the line.
Thanks for spotting another one: this was was because insertlastword()
wasn__t consistently remetafying the line if it returned in error. I__ve
added another UMETACHECK() in the handler for the zle builtin so that
this sort of problem emerges a bit earlier.
I__ve already committed this because of problems with my ISP__s mail
server.
Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.28
diff -u -r1.28 zle_hist.c
--- Src/Zle/zle_hist.c 26 Sep 2005 18:39:21 -0000 1.28
+++ Src/Zle/zle_hist.c 23 Oct 2005 17:14:57 -0000
@@ -577,13 +577,17 @@
* a deleted word, because that can only have come
* from a non-empty line. I think.
*/
- if (!(l = bufferwords(NULL, NULL, NULL)))
+ if (!(l = bufferwords(NULL, NULL, NULL))) {
+ unmetafy_line();
return 1;
+ }
nwords = countlinknodes(l);
} else {
/* Some stored line. */
- if (!(he = quietgethist(evhist)) || !he->nwords)
+ if (!(he = quietgethist(evhist)) || !he->nwords) {
+ unmetafy_line();
return 1;
+ }
nwords = he->nwords;
}
if (wordpos) {
@@ -602,6 +606,7 @@
* has not changed, and lastinsert is still valid.
*/
lasthist = evhist;
+ unmetafy_line();
return 1;
}
/*
Index: Src/Zle/zle_thingy.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_thingy.c,v
retrieving revision 1.19
diff -u -r1.19 zle_thingy.c
--- Src/Zle/zle_thingy.c 29 Sep 2005 17:32:38 -0000 1.19
+++ Src/Zle/zle_thingy.c 23 Oct 2005 17:14:58 -0000
@@ -358,6 +358,8 @@
struct opn const *op, *opp;
int n;
+ UNMETACHECK();
+
/* select operation and ensure no clashing arguments */
for(op = opns; op->o && !OPT_ISSET(ops,STOUC(op->o)); op++) ;
if(op->o)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author