Terminal: Handle bell and warn on unimplemented control characters
This commit is contained in:
parent
4efaf65d3f
commit
1e65f02ff7
|
@ -676,6 +676,9 @@ Rectangle Terminal::putcodepoint(uint32_t codepoint)
|
||||||
auto& texture = m_window->texture();
|
auto& texture = m_window->texture();
|
||||||
switch (codepoint)
|
switch (codepoint)
|
||||||
{
|
{
|
||||||
|
case '\a':
|
||||||
|
// TODO: bell
|
||||||
|
break;
|
||||||
case '\e':
|
case '\e':
|
||||||
m_state = State::ESC;
|
m_state = State::ESC;
|
||||||
break;
|
break;
|
||||||
|
@ -697,6 +700,12 @@ Rectangle Terminal::putcodepoint(uint32_t codepoint)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
if (iscntrl(codepoint))
|
||||||
|
{
|
||||||
|
dwarnln("unhandled control character 0x{2H}", codepoint);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_cursor.x >= cols())
|
if (m_cursor.x >= cols())
|
||||||
{
|
{
|
||||||
m_cursor.x = 0;
|
m_cursor.x = 0;
|
||||||
|
|
Loading…
Reference in New Issue