mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:27:45 +00:00
LibVT+Terminal: Implement line wrapping
This commit implements line wrapping in the terminal, and tries its best to move the cursor to the "correct" position.
This commit is contained in:
parent
424965954f
commit
2f2b7814d1
5 changed files with 206 additions and 22 deletions
|
@ -51,4 +51,15 @@ private:
|
|||
int m_column { -1 };
|
||||
};
|
||||
|
||||
struct CursorPosition {
|
||||
u16 row { 0 };
|
||||
u16 column { 0 };
|
||||
|
||||
void clamp(u16 max_row, u16 max_column)
|
||||
{
|
||||
row = min(row, max_row);
|
||||
column = min(column, max_column);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue