forked from Bananymous/banan-os
Kernel: TTY now supports CSI s and u
These are commonly supported values to save and load cursor position
This commit is contained in:
parent
a365813fa9
commit
5425394880
|
@ -84,6 +84,9 @@ namespace Kernel
|
||||||
uint32_t m_width { 0 };
|
uint32_t m_width { 0 };
|
||||||
uint32_t m_height { 0 };
|
uint32_t m_height { 0 };
|
||||||
|
|
||||||
|
uint32_t m_saved_row { 0 };
|
||||||
|
uint32_t m_saved_column { 0 };
|
||||||
|
|
||||||
uint32_t m_row { 0 };
|
uint32_t m_row { 0 };
|
||||||
uint32_t m_column { 0 };
|
uint32_t m_column { 0 };
|
||||||
Cell* m_buffer { nullptr };
|
Cell* m_buffer { nullptr };
|
||||||
|
|
|
@ -473,6 +473,14 @@ namespace Kernel
|
||||||
case 'm':
|
case 'm':
|
||||||
handle_ansi_csi_color();
|
handle_ansi_csi_color();
|
||||||
return reset_ansi();
|
return reset_ansi();
|
||||||
|
case 's':
|
||||||
|
m_saved_row = m_row;
|
||||||
|
m_saved_column = m_column;
|
||||||
|
return reset_ansi();
|
||||||
|
case 'u':
|
||||||
|
m_row = m_saved_row;
|
||||||
|
m_column = m_saved_column;
|
||||||
|
return reset_ansi();
|
||||||
default:
|
default:
|
||||||
dprintln("Unsupported ANSI CSI character {}", ch);
|
dprintln("Unsupported ANSI CSI character {}", ch);
|
||||||
return reset_ansi();
|
return reset_ansi();
|
||||||
|
|
Loading…
Reference in New Issue