about summary refs log tree commit diff
path: root/Src/Zle/zle.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-03 11:38:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-03 11:38:55 +0000
commit2c5ea79f1762dcbafca8d08bc5bdb47d75670f03 (patch)
tree281e1696494e62aab0602d0186669520f7ecec7b /Src/Zle/zle.h
parentb44ed0b03250e17a21194ca63602ff8dd5191583 (diff)
downloadzsh-2c5ea79f1762dcbafca8d08bc5bdb47d75670f03.tar.gz
zsh-2c5ea79f1762dcbafca8d08bc5bdb47d75670f03.tar.xz
zsh-2c5ea79f1762dcbafca8d08bc5bdb47d75670f03.zip
24782: initial go at highlighting of characters in zle command lines
Diffstat (limited to 'Src/Zle/zle.h')
-rw-r--r--Src/Zle/zle.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h
index be6976a31..44450ab16 100644
--- a/Src/Zle/zle.h
+++ b/Src/Zle/zle.h
@@ -325,6 +325,37 @@ enum suffixtype {
     SUFTYP_NEGRNG		/* Range of characters not to match */
 };
 
+
+#ifdef MULTIBYTE_SUPPORT
+/*
+ * We use a wint_t here, since we need an invalid character as a
+ * placeholder and wint_t guarantees that we can use WEOF to do this.
+ */
+typedef wint_t REFRESH_CHAR;
+#else
+typedef char REFRESH_CHAR;
+#endif
+
+/*
+ * Description of one screen cell in zle_refresh.c
+ */
+typedef struct {
+    /* The (possibly wide) character */
+    REFRESH_CHAR chr;
+    /*
+     * Its attributes.  'On' attributes (TXT_ATTR_ON_MASK) are
+     * applied before the character, 'off' attributes (TXT_ATTR_OFF_MASK)
+     * after it.  'On' attributes are present for all characters that
+     * need the effect; 'off' attributes are only present for the
+     * last character in the sequence.
+     */
+    REFRESH_CHAR atr;
+} REFRESH_ELEMENT;
+
+/* A string of screen cells */
+typedef REFRESH_ELEMENT *REFRESH_STRING;
+
+
 #ifdef DEBUG
 #define METACHECK()		\
 	DPUTS(zlemetaline == NULL, "line not metafied")