ui/embed: don't increase cursor with multibyte chars

When waiting for a multibyte unicode codepoint to fill up, don't
increase cursor at all.
memfd
Manos Pitsidianakis 5 years ago
parent 04e1137b36
commit e1dec05881
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

@ -256,12 +256,15 @@ impl EmbedGrid {
match codepoints {
CodepointBuf::None if c & 0b1110_0000 == 0b1100_0000 => {
*codepoints = CodepointBuf::TwoCodepoints(vec![c]);
return;
}
CodepointBuf::None if c & 0b1111_0000 == 0b1110_0000 => {
*codepoints = CodepointBuf::ThreeCodepoints(vec![c]);
return;
}
CodepointBuf::None if c & 0b1111_1000 == 0b1111_0000 => {
*codepoints = CodepointBuf::FourCodepoints(vec![c]);
return;
}
CodepointBuf::TwoCodepoints(buf) => {
grid[cursor_val!()].set_ch(

Loading…
Cancel
Save