Add UTF8 support and a better xterm parsing.

This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/2
This commit is contained in:
ArthurSonzogni
2019-06-23 17:47:33 +02:00
parent 8fede35dc5
commit 001a0ae925
9 changed files with 220 additions and 125 deletions

View File

@@ -73,10 +73,8 @@ bool Input::OnEvent(Event event) {
}
// Content
constexpr char ESC = char(27);
if (event.values[0] != ESC) {
wchar_t v = (char)event.values[0];
content.insert(cursor_position, 1, v);
if (event.is_character()) {
content.insert(cursor_position, 1, event.character());
cursor_position++;
return true;
}