diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:50:55 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:50:55 +0000 |
| commit | 80c2d9d89df11c5830de900f98b5d9f3f406a1c1 (patch) | |
| tree | a27132ebbd0940872c16afd3f48f4ee791820a0a /terminal.h | |
| parent | Merge branch 'sixel-heap-user-after-free-after-blending' (diff) | |
| parent | client: add +/-graphemes to version output (diff) | |
Merge branch 'harfbuzz'
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -8,10 +8,15 @@ #include <threads.h> #include <semaphore.h> +#if defined(FOOT_GRAPHEME_CLUSTERING) + #include <utf8proc.h> +#endif + #include <tllist.h> #include <fcft/fcft.h> //#include "config.h" +#include "composed.h" #include "debug.h" #include "fdm.h" #include "macros.h" @@ -80,12 +85,6 @@ struct damage { int lines; }; -struct composed { - wchar_t base; - wchar_t combining[5]; - uint8_t count; -}; - struct row_uri_range { int start; int end; @@ -152,6 +151,9 @@ struct vt_param { struct vt { int state; /* enum state */ wchar_t last_printed; +#if defined(FOOT_GRAPHEME_CLUSTERING) + utf8proc_int32_t grapheme_state; +#endif wchar_t utf8; struct { struct vt_param v[16]; @@ -720,3 +722,10 @@ void term_collect_urls(struct terminal *term); void term_osc8_open(struct terminal *term, uint64_t id, const char *uri); void term_osc8_close(struct terminal *term); + +static inline void term_reset_grapheme_state(struct terminal *term) +{ +#if defined(FOOT_GRAPHEME_CLUSTERING) + term->vt.grapheme_state = 0; +#endif +} |
