mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibVT: Support the DA (Device Attributes) request (final 'c')
This is used by vttest on startup to query the device for identity.
This commit is contained in:
parent
f4e7aecec2
commit
e6f5ce8285
4 changed files with 27 additions and 0 deletions
|
@ -491,6 +491,12 @@ void Terminal::escape$L(const ParamVector& params)
|
|||
m_need_full_flush = true;
|
||||
}
|
||||
|
||||
void Terminal::escape$c(const ParamVector&)
|
||||
{
|
||||
// DA - Device Attributes
|
||||
emit_string("\033[?1;0c");
|
||||
}
|
||||
|
||||
void Terminal::escape$M(const ParamVector& params)
|
||||
{
|
||||
int count = 1;
|
||||
|
@ -659,6 +665,9 @@ void Terminal::execute_escape_sequence(u8 final)
|
|||
case 'h':
|
||||
escape$h_l(false, question_param, params);
|
||||
break;
|
||||
case 'c':
|
||||
escape$c(params);
|
||||
break;
|
||||
default:
|
||||
dbgprintf("Terminal::execute_escape_sequence: Unhandled final '%c'\n", final);
|
||||
break;
|
||||
|
@ -867,6 +876,12 @@ void Terminal::inject_string(const StringView& str)
|
|||
on_char(str[i]);
|
||||
}
|
||||
|
||||
void Terminal::emit_string(const StringView& str)
|
||||
{
|
||||
for (size_t i = 0; i < str.length(); ++i)
|
||||
m_client.emit_char(str[i]);
|
||||
}
|
||||
|
||||
void Terminal::unimplemented_escape()
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue