From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: Crash in copy-earlier-word
Date: Sun, 23 Oct 2005 20:38:37 +0100 [thread overview]
Message-ID: <20051023203837.6d871a4b.p.w.stephenson@ntlworld.com> (raw)
In-Reply-To: <237967ef0510220929p651a40b5od5741245092394a1@mail.gmail.com>
On Sat, 22 Oct 2005 18:29:04 +0200
Mikael Magnusson <mikachu@gmail.com> 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)
next prev parent reply other threads:[~2005-10-23 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-22 16:29 Mikael Magnusson
2005-10-23 19:38 ` Peter Stephenson [this message]
2005-10-23 19:42 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051023203837.6d871a4b.p.w.stephenson@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).