mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibVT: Implement Device Status Report (cursor position report)
This commit is contained in:
parent
8286f8b996
commit
2663739db1
Notes:
sideshowbarker
2024-07-19 07:45:47 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/2663739db11 Pull-request: https://github.com/SerenityOS/serenity/pull/1708
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
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibVT/Position.h>
|
||||
|
||||
|
@ -178,6 +178,7 @@ private:
|
|||
void NEL();
|
||||
void IND();
|
||||
void RI();
|
||||
void DSR();
|
||||
|
||||
TerminalClient& m_client;
|
||||
|
||||
|
|
Loading…
Reference in a new issue