diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-10-19 22:49:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-10-19 22:49:36 +0000 |
commit | 212094220376c948ccfa50948e228856dda6ea43 (patch) | |
tree | 7ca36cf277cd2f0803e5f14ea7cd76afd4db2e33 /Functions/Zle/define-composed-chars | |
parent | 2ddaeb605f4b7a89dab23a843ae79fbdc88afa69 (diff) | |
download | zsh-212094220376c948ccfa50948e228856dda6ea43.tar.gz zsh-212094220376c948ccfa50948e228856dda6ea43.tar.xz zsh-212094220376c948ccfa50948e228856dda6ea43.zip |
21891: compose double width characters with ^A etc.
Diffstat (limited to 'Functions/Zle/define-composed-chars')
-rw-r--r-- | Functions/Zle/define-composed-chars | 12 |
1 files changed, 12 insertions, 0 deletions
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" |