summaryrefslogtreecommitdiff
path: root/Src/Zle/zle.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-15 16:49:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-15 16:49:55 +0000
commit1875c12734938595033715a948f50b05b76bca3d (patch)
tree4b4bf3e48cddd2a8d5a3b187fde6772d424dfaa2 /Src/Zle/zle.h
parentfe6d34f024a20d57741b500a91649fa7032cc509 (diff)
downloadzsh-1875c12734938595033715a948f50b05b76bca3d.tar.gz
zsh-1875c12734938595033715a948f50b05b76bca3d.zip
24819: fix transposing characters and sneaky combination generation
Diffstat (limited to 'Src/Zle/zle.h')
-rw-r--r--Src/Zle/zle.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h
index 40230e784..bed5888cb 100644
--- a/Src/Zle/zle.h
+++ b/Src/Zle/zle.h
@@ -75,14 +75,19 @@ typedef wint_t ZLE_INT_T;
#define LASTFULLCHAR_T ZLE_INT_T
/* We may need to handle combining character alignment */
-#define CCLEFT() alignmultiwordleft(1)
-#define CCRIGHT() alignmultiwordright(1)
+#define CCLEFT() alignmultiwordleft(&zlecs, 1)
+#define CCRIGHT() alignmultiwordright(&zlecs, 1)
/*
* Increment or decrement the cursor position, skipping over
* combining characters.
*/
#define INCCS() inccs()
#define DECCS() deccs()
+/*
+ * Same for any other position.
+ */
+#define INCPOS(pos) incpos(&pos)
+#define DECPOS(pos) decpos(&pos)
#else /* Not MULTIBYTE_SUPPORT: old single-byte code */
@@ -151,6 +156,11 @@ static inline int ZS_strncmp(ZLE_STRING_T s1, ZLE_STRING_T s2, size_t l)
*/
#define INCCS() ((void)(zlecs++))
#define DECCS() ((void)(zlecs--))
+/*
+ * Same for any other position.
+ */
+#define INCPOS(pos) ((void)(pos++))
+#define DECPOS(pos) ((void)(pos--))
#endif