File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,18 @@ const (
130
130
RequestSyncdOutput = "\x1b [?2026$p"
131
131
)
132
132
133
+ // Grapheme Clustering Mode is a mode that determines whether the terminal
134
+ // should look for grapheme clusters instead of single runes in the rendered
135
+ // text. This makes the terminal properly render combining characters such as
136
+ // emojis.
137
+ //
138
+ // See: https://github.com/contour-terminal/terminal-unicode-core
139
+ const (
140
+ EnableGraphemeClustering = "\x1b [?2027h"
141
+ DisableGraphemeClustering = "\x1b [?2027l"
142
+ RequestGraphemeClustering = "\x1b [?2027$p"
143
+ )
144
+
133
145
// Win32Input is a mode that determines whether input is processed by the
134
146
// Win32 console and Conpty.
135
147
//
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ const (
30
30
// The cell width will always be 0 for control and escape sequences, 1 for
31
31
// ASCII printable characters, and the number of cells other Unicode characters
32
32
// occupy. It uses the uniseg package to calculate the width of Unicode
33
- // graphemes and characters.
33
+ // graphemes and characters. This means it will always do grapheme clustering
34
+ // (mode 2027).
34
35
//
35
36
// Passing a non-nil [*Parser] as the last argument will allow the decoder to
36
37
// collect sequence parameters, data, and commands. The parser cmd will have
You can’t perform that action at this time.
0 commit comments