Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: (large) initial support for combining characters in ZLE.
- X-seq: zsh-workers 24820
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: (large) initial support for combining characters in ZLE.
- Date: Wed, 16 Apr 2008 03:28:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=2+rXuDIaO1cMBpL2wkASYMfcwuD2CQPw3Z7knvXgsO8=; b=Md3TGX5sGuoIhIUb2/AYn7C697PF7ZMP3SAcHMBL8JwDEgvQtCHS7oBlSGvwtnqwUZv+LMQ+Y2K9/vMd8oDOzsmDkEEsTyimLvBzbgoUZLWvpu6mlsS3gP+mKBmDhteDRS8jFtHrO2NDhatax/nwtamynFV3ytpjXsY2HnSFrVY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lAbU9JZnbVIKHywtDF6vvZe0XsJohnHWZMB3jUMVZfGX6OAvf+r1S7iCl0/nGYIZi4veurj9rMUQfJgOWpi/VYkZxs/n4KM48kFmOUxO1bUtaGv4QeIDHsKkgaM/iTiQypMS9i0KmvQEuZd2XsTmn66hALk/2K6+WbSepBF0hLE=
- In-reply-to: <20080415174645.0590d589@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080413175442.0e95a241@pws-pc> <237967ef0804140634l7e02ce6fofff7f3f3ec6c8d7c@xxxxxxxxxxxxxx> <20080414145425.566bcb92@news01> <237967ef0804150658h1f8df5e5w422955fc6b92fe29@xxxxxxxxxxxxxx> <20080415174645.0590d589@news01>
On 15/04/2008, Peter Stephenson <pws@xxxxxxx> wrote:
> On Tue, 15 Apr 2008 15:58:54 +0200
>
> "Mikael Magnusson" <mikachu@xxxxxxxxx> wrote:
>
> > This is better, but I can still put the cursor between the a and the ~.
> > > > % zsh -f
> > > > % setopt combiningchars
> > > > % print -z $'\u0342'
> > > > the buffer should now contain an inverted <0342>, press left or ctrl-a
> > > > or whatever to go to the start of the line and press 'a'.
> > But instead of pressing a, type a '!' and go left again and press 'a',
> > then press ctrl-d. (or ctrl-t)
>
>
> OK, so we need to fix things up right at the end after an operation in case
> it generated some combinations a sneaky way. Hence some more CCRIGHT()s.
>
>
> > Another thing I noticed is that ctrl-t moves just the combining char,
> > not the whole base+combiningchar, but that might already be on your
> > todo as a subset of "fix widgets" :).
>
>
> This should help with fixing the word stuff, when I get round to it...
>
> I'm fed up with the names zle_misc.c and zle_utils.c. I can never find
> anything.
I wonder if I'm just being evil now...
zsh -f
setopt interactivecomments
function toggleopt() {
#is there some easier way to do this?
[[ $options[$1] = on ]] && setopt no$1 || setopt $1
}
compdef _options toggleopt=setopt
function _togglecombining() {
toggleopt combiningchars
}
zle -N _togglecombining
bindkey ^K _togglecombining
print -z $'a\u0342'
<press ctrl-k and then left, and ctrl-k again>
...
sorry :)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author