mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibVT: Replace escape$h_l with SM (Set Mode) / RM (Reset Mode)
This commit is contained in:
parent
be57b81336
commit
fd8c250866
Notes:
sideshowbarker
2024-07-19 09:47:18 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/fd8c2508664 Pull-request: https://github.com/SerenityOS/serenity/pull/1137 Reviewed-by: https://github.com/awesomekling
@ -124,7 +124,7 @@ inline bool is_valid_final_character(u8 ch)
|
||||
return ch >= 0x40 && ch <= 0x7e;
|
||||
}
|
||||
|
||||
void Terminal::escape$h_l(bool should_set, bool question_param, const ParamVector& params)
|
||||
void Terminal::alter_mode(bool should_set, bool question_param, const ParamVector& params)
|
||||
{
|
||||
int mode = 2;
|
||||
if (params.size() > 0) {
|
||||
@ -153,6 +153,19 @@ void Terminal::escape$h_l(bool should_set, bool question_param, const ParamVecto
|
||||
}
|
||||
}
|
||||
|
||||
void Terminal::RM(bool question_param, const ParamVector& params)
|
||||
{
|
||||
// RM – Reset Mode
|
||||
alter_mode(true, question_param, params);
|
||||
}
|
||||
|
||||
void Terminal::SM(bool question_param, const ParamVector& params)
|
||||
{
|
||||
// SM – Set Mode
|
||||
alter_mode(false, question_param, params);
|
||||
}
|
||||
|
||||
|
||||
void Terminal::SGR(const ParamVector& params)
|
||||
{
|
||||
// SGR – Select Graphic Rendition
|
||||
@ -679,10 +692,10 @@ void Terminal::execute_escape_sequence(u8 final)
|
||||
escape$r(params);
|
||||
break;
|
||||
case 'l':
|
||||
escape$h_l(true, question_param, params);
|
||||
RM(question_param, params);
|
||||
break;
|
||||
case 'h':
|
||||
escape$h_l(false, question_param, params);
|
||||
SM(question_param, params);
|
||||
break;
|
||||
case 'c':
|
||||
DA(params);
|
||||
|
@ -148,6 +148,8 @@ private:
|
||||
|
||||
void emit_string(const StringView&);
|
||||
|
||||
void alter_mode(bool, bool, const ParamVector&);
|
||||
|
||||
void CUU(const ParamVector&);
|
||||
void CUD(const ParamVector&);
|
||||
void CUF(const ParamVector&);
|
||||
@ -169,7 +171,8 @@ private:
|
||||
void escape$S(const ParamVector&);
|
||||
void escape$T(const ParamVector&);
|
||||
void escape$L(const ParamVector&);
|
||||
void escape$h_l(bool, bool, const ParamVector&);
|
||||
void RM(bool, const ParamVector&);
|
||||
void SM(bool, const ParamVector&);
|
||||
void DA(const ParamVector&);
|
||||
void HVP(const ParamVector&);
|
||||
void NEL();
|
||||
|
Loading…
Reference in New Issue
Block a user