zsh-workers
 help / color / mirror / code / Atom feed
From: "Mikael Magnusson" <mikachu@gmail.com>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: down-line-or-search doesn't go to last entry
Date: Sun, 11 May 2008 21:10:59 +0200	[thread overview]
Message-ID: <237967ef0805111210k62480a14l79d73a9b1cbc4ac7@mail.gmail.com> (raw)
In-Reply-To: <20080511193145.29b04a6e@pws-pc>

2008/5/11 Peter Stephenson <p.w.stephenson@ntlworld.com>:
>
> On Sun, 11 May 2008 16:23:54 +0200
>  "Mikael Magnusson" <mikachu@gmail.com> wrote:
>  > I have {up,down}-line-or-search bound to Up/Down, and I noticed
>  > recently that down-line-or-search won't go to the empty entry anymore.
>  > Ie if you press up and then down, it will still have the previous
>  > entry in the cmdline, I have to press page down where I have
>  > down-history to get back to the empty line.
>
>  I have been annoying myself silly with this over yet another two hours
>  of my life that will never come again.
>
>  There is one bug in zlinecmp() that I've recently introduced.
>
>  However, I don't think that's the main problem, which is the second test
>  for whether a search line is acceptable.  In recent versions of the
>  shell, the test has been looking to ensure the search text *differs*
>  from the line you're trying it against, which obviously doesn't make
>  sense.  It was already doing something such in 4.2.  This is complicated
>  by the fact that until I changed it to using metafied strings the
>  comparisons were being done in interesting ways which have changed
>  subtly over the shell's history (though I haven't gone back before 4.2).
>  The upshot seems to be the test previously fortuitously failed due to
>  the fact that it was being passed the length of the current editing
>  line, not the length of the search string.
>
>  I am guessing that the real point of this second test is to compare if
>  the line is different from the one you've just left, and hence it
>  shouldn't involve the search string at all, just the line you're leaving
>  and the line you're trying.  Those more energetic may wish, as an
>  exercise, to compare with the archive.
>
>  Let's see how this works.

That appears to fix the problem here, thanks.

-- 
Mikael Magnusson


      reply	other threads:[~2008-05-11 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-11 14:23 Mikael Magnusson
2008-05-11 18:31 ` Peter Stephenson
2008-05-11 19:10   ` Mikael Magnusson [this message]

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=237967ef0805111210k62480a14l79d73a9b1cbc4ac7@mail.gmail.com \
    --to=mikachu@gmail.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).