LibVT: Rename EscapeState::ExpectBracket => GotEscape

Seems like there are many escape sequences that don't start with
brackets, so let's call the post-escape state "GotEscape" instead. :^)
This commit is contained in:
Andreas Kling 2020-01-25 20:02:31 +01:00
parent 897ad1b927
commit 0d191aae13
Notes: sideshowbarker 2024-07-19 09:49:43 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -779,7 +779,7 @@ void Terminal::on_char(u8 ch)
dbgprintf("Terminal::on_char: %b (%c), fg=%u, bg=%u\n", ch, ch, m_current_attribute.foreground_color, m_current_attribute.background_color);
#endif
switch (m_escape_state) {
case ExpectBracket:
case GotEscape:
if (ch == '[') {
m_escape_state = ExpectParameter;
} else if (ch == '(') {
@ -855,7 +855,7 @@ void Terminal::on_char(u8 ch)
case '\0':
return;
case '\033':
m_escape_state = ExpectBracket;
m_escape_state = GotEscape;
m_swallow_current = false;
return;
case 8: // Backspace

View file

@ -200,7 +200,7 @@ private:
enum EscapeState {
Normal,
ExpectBracket,
GotEscape,
ExpectParameter,
ExpectIntermediate,
ExpectFinal,