Kernel: TTY now supports CSI s and u

These are commonly supported values to save and load cursor
position
This commit is contained in:
Bananymous 2023-06-05 18:19:13 +03:00
parent a365813fa9
commit 5425394880
2 changed files with 11 additions and 0 deletions

View File

@ -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 };

View File

@ -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();