mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:07:34 +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
|
@ -194,17 +194,6 @@ protected:
|
|||
virtual void receive_dcs_char(u8 byte) override;
|
||||
virtual void execute_dcs_sequence() override;
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
struct BufferState {
|
||||
Attribute attribute;
|
||||
CursorPosition cursor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue