Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: (large) initial support for combining characters in ZLE.



2008/4/16 Peter Stephenson <pws@xxxxxxx>:
> "Mikael Magnusson" wrote:
>> 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>
>
> I haven't looked at the behaviour of user-defined widgets at all, which
> will need much more work, but on exit from a widget is a good place to
> fix up the cursor position.
>
> Some more for the FAQ, too.

I suddenly realized while doing something completely different that this
might still work (where work is defined as not work), and it does.

zsh -f
print -z $'a\u0342'
<alt-x>push-input
setopt combiningchars
boom

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author