From 1875c12734938595033715a948f50b05b76bca3d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 15 Apr 2008 16:49:55 +0000 Subject: 24819: fix transposing characters and sneaky combination generation --- Src/Zle/zle.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Src/Zle/zle.h') 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 -- cgit 1.4.1