From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-users@math.gatech.edu
Subject: Re: User-defined replacement for *-line-or-search in 3.1.4
Date: Tue, 9 Jun 1998 21:25:57 -0700 [thread overview]
Message-ID: <980609212557.ZM8906@candle.brasslantern.com> (raw)
In-Reply-To: <980609132319.ZM7074@candle.brasslantern.com>
On Jun 9, 1:23pm, I wrote:
} Subject: User-defined replacement for *-line-or-search in 3.1.4
}
} Shouldn't $#LBUFFER == $CURSOR == $#moveorsearchpattern on first call to this
} function? If so, why is the +1 necessary? (If I leave it out, the call to
} history-beginning-search-*ward uses too short a prefix.)
}
} --- 8< --- snip --- 8< ---
}
} # Why is +1 needed here, but not needed at $#BUFFER?
} CURSOR=$[$#moveorsearchpattern+1]
} zle history-beginning-search-backward
} CURSOR=$#BUFFER
I've just been fooling with this in the debugger, and I can no longer get
the behavior I was seeing where adding one to the pattern length was
necessary. I don't know what strangeness I had going on, though I have
done a rebuild in the interim ... anyway, I recommend changing the first
assignment of CURSOR to
CURSOR=$#moveorsearchpattern
in both of the functions I posted earlier today.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1998-06-10 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <19980428143325.59341@gmp-fores1.uk.jpmorgan.com>
[not found] ` <199804281408.PAA32237@taos.demon.co.uk>
[not found] ` <19980609141304.41665@gmp-fores1.uk.jpmorgan.com>
[not found] ` <980609082238.ZM5717@candle.brasslantern.com>
[not found] ` <vbu35utvzk.fsf@snake.isode.com>
[not found] ` <980609114223.ZM6613@candle.brasslantern.com>
1998-06-09 20:23 ` Bart Schaefer
1998-06-10 4:25 ` Bart Schaefer [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=980609212557.ZM8906@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@math.gatech.edu \
/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).