From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1481 invoked from network); 27 Mar 2002 13:00:11 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Mar 2002 13:00:11 -0000 Received: (qmail 8261 invoked by alias); 27 Mar 2002 13:00:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16912 Received: (qmail 8225 invoked from network); 27 Mar 2002 13:00:00 -0000 X-VirusChecked: Checked Date: Wed, 27 Mar 2002 12:59:31 +0000 From: Oliver Kiddle To: Bart Schaefer Cc: zsh-workers@sunsite.dk Subject: Re: up-line-or-search question Message-ID: <20020327125931.GA5046@logica.com> References: <20020326192340.GA12802@logica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Sender: Oliver Kiddle On Tue, Mar 26, 2002 at 11:51:01AM -0800, Bart Schaefer wrote: > > I'd rather have it feep at the end of the history. Moving down a line > when the search fails means I lose my context and have to re-establish > it before I can e.g. reverse the direction of the search. In the case of this function, re-establishing the context is merely a case of pressing the up cursor which I don't think is that much of a problem. I did get it slightly wrong in the last function though because if the h-b-s-f fails and the subsequent d-l-o-h does a down history instead of down line, it is not good. So it needs: [[ $RBUFFER = *$'\n'* ]] || return before the fi. > Don't test [[ $LASTWIDGET = $__searching ]], test [[ -n $__searching ]]. > And name the cursor-saving variable something less generic, there may be > other functions that want to save and restore the cursor ... That doesn't help. It also means that the cursor position for searches is then fixed forever after for that shell instance. I think I've got it working now but am not sure why or whether there was something peculiar with the history list I had yesterday. Do we want to include the cursor movement in the examples in the distribution - it is more like up-line-or- search? Perhaps we need to use styles to configure it? > I'm not sure what you mean. If you mean supply args at the time that you I meant at the time when the key binding is created. That answers my question, thanks. Oliver -- This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.