From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14878 invoked from network); 29 May 2000 22:47:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 May 2000 22:47:43 -0000 Received: (qmail 7675 invoked by alias); 29 May 2000 22:47:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11642 Received: (qmail 7668 invoked from network); 29 May 2000 22:47:31 -0000 From: "Bart Schaefer" Message-Id: <1000529224721.ZM10474@candle.brasslantern.com> Date: Mon, 29 May 2000 22:47:21 +0000 In-Reply-To: Comments: In reply to Wayne Davison "Re: History still coredumping after "print -s" during completion" (May 29, 2:30pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Wayne Davison Subject: Re: History still coredumping after "print -s" during completion Cc: zsh-workers@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 29, 2:30pm, Wayne Davison wrote: } Subject: Re: History still coredumping after "print -s" during completion } } + It tweaks execzlefunc() so that, when it calls a completion } widget, it ensures that if we were at curline, we're still at } curline. This change assumes that completion never causes us to } change to a different history line. If this is not true, we'll } need a different fix. Completion shouldn't ever cause us to change to a different history line, but an ordinary ZLE widget might. foo() { zle up-line-or-history print -s "Hi there" zle down-line-or-history } zle -N foo bindkey ^Xj foo } With these changes, your example now works right: } } % ls } } This will now fail to move downward (since there's nowhere to go), } and a will show you the newly-added history line. Yay! Thanks, Wayne. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net