mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-05-06 09:13:48 +08:00
Fix xterm parsing. unsigned vs signed char problem.
This commit is contained in:
parent
001a0ae925
commit
9c1913de51
@ -17,7 +17,7 @@ class DrawKey : public Component {
|
||||
for (size_t i = std::max(0, (int)keys.size() - 10); i < keys.size(); ++i) {
|
||||
std::wstring code;
|
||||
for(auto& it : keys[i].input())
|
||||
code += L" " + std::to_wstring((int)it);
|
||||
code += L" " + std::to_wstring((unsigned int)it);
|
||||
|
||||
code = L"(" + code + L" ) -> " + keys[i].character() + L")";
|
||||
children.push_back(text(code));
|
||||
|
@ -128,7 +128,7 @@ Event Event::GetEvent(std::function<char()> getchar) {
|
||||
return ParseESC(getchar, input);
|
||||
}
|
||||
|
||||
if (input[0] < 32) // C0
|
||||
if (input[0] >= 0 && input[0] < 32) // C0
|
||||
return Event::Special(input);
|
||||
|
||||
return ParseUTF8(getchar, input);
|
||||
|
Loading…
Reference in New Issue
Block a user