mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibVT: Implement Device Status Report (cursor position report)
This commit is contained in:
parent
8286f8b996
commit
2663739db1
2 changed files with 14 additions and 1 deletions
|
@ -704,6 +704,12 @@ void Terminal::execute_escape_sequence(u8 final)
|
|||
case 'f':
|
||||
HVP(params);
|
||||
break;
|
||||
case 'n':
|
||||
if (params.size() == 1 && params[0] == 6)
|
||||
DSR();
|
||||
else
|
||||
dbg() << "Unknown CSIxn command";
|
||||
break;
|
||||
default:
|
||||
dbgprintf("Terminal::execute_escape_sequence: Unhandled final '%c'\n", final);
|
||||
break;
|
||||
|
@ -806,6 +812,12 @@ void Terminal::RI()
|
|||
CUU({});
|
||||
}
|
||||
|
||||
void Terminal::DSR()
|
||||
{
|
||||
// Device Status Report (cursor position query)
|
||||
emit_string(String::format("\033[%d;%dR", m_cursor_row + 1, m_cursor_column + 1));
|
||||
}
|
||||
|
||||
void Terminal::on_char(u8 ch)
|
||||
{
|
||||
#ifdef TERMINAL_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue