LibVT: Implement switching between 80/132 column modes (DECCOLM)
This gets us past a few more screens in vttest. :^)
This commit is contained in:
parent
8c9ae4e537
commit
81b21504a7
Notes:
sideshowbarker
2024-07-18 22:06:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/81b21504a7b
1 changed files with 9 additions and 0 deletions
|
@ -88,6 +88,14 @@ void Terminal::alter_mode(bool should_set, bool question_param, const ParamVecto
|
|||
}
|
||||
} else {
|
||||
switch (mode) {
|
||||
case 3: {
|
||||
// 80/132-column mode (DECCOLM)
|
||||
unsigned new_columns = should_set ? 80 : 132;
|
||||
dbgln("Setting {}-column mode", new_columns);
|
||||
set_size(new_columns, rows());
|
||||
clear();
|
||||
break;
|
||||
}
|
||||
case 25:
|
||||
// Hide cursor command, but doesn't need to be run (for now, because
|
||||
// we don't do inverse control codes anyways)
|
||||
|
@ -97,6 +105,7 @@ void Terminal::alter_mode(bool should_set, bool question_param, const ParamVecto
|
|||
dbgln("Terminal: Show Cursor escapecode received. Not needed: ignored.");
|
||||
break;
|
||||
default:
|
||||
dbgln("Set Mode: Unimplemented mode {}", mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue