From 212094220376c948ccfa50948e228856dda6ea43 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 19 Oct 2005 22:49:36 +0000 Subject: 21891: compose double width characters with ^A etc. --- Functions/Zle/define-composed-chars | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Functions/Zle') diff --git a/Functions/Zle/define-composed-chars b/Functions/Zle/define-composed-chars index f6d47c53a..f15f8e38c 100644 --- a/Functions/Zle/define-composed-chars +++ b/Functions/Zle/define-composed-chars @@ -1,6 +1,9 @@ # This is not a widget function, it is only a helper for insert-composed-char # to cut down on resident memory use. +emulate -L zsh +setopt cbases + # The associative array zsh_accent_chars is indexed by the # accent. The values are sets of character / Unicode pairs for # the character with the given accent. The Unicode value is @@ -249,6 +252,15 @@ z[$a]+=" Z 5e6" a=h z[$a]+=" S 5e9" +typeset -i 16 -Z 4 ia +typeset -i 16 -Z 6 iuni +# Extended width characters ^A, ^B, ... (not RFC1345) +for (( ia = 0x21; ia < 0x7f; ia++ )); do + (( iuni = ia + 0xff00 - 0x20 )) + eval a="\$'\\x${ia##0x}'" + z[$a]+=" ^ ${iuni##0x}" +done + # Card suits: here first character is the interesting one for a b in S 2660 H 2661 D 2662 C 2663; do z[$a]+=" c $b" -- cgit 1.4.1