1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 20:05:07 +00:00

LibVT: Fix newline handling

Before this commit, we would jump to the first column after receiving
the '\n' line feed character. This is not the correct behavior, as it
should only move the cursor now. Translating the typed Return key into
the correct CR LF ("\r\n") is the TTY's job, which was fixed in #7184.

Fixes #6820
Fixes #6960
This commit is contained in:
Daniel Bertalan 2021-05-17 16:25:35 +02:00 committed by Andreas Kling
parent f25209113f
commit 5d80debc1f
4 changed files with 19 additions and 14 deletions

View file

@ -68,7 +68,7 @@ void ConsoleImpl::scroll_up()
void ConsoleImpl::scroll_down()
{
}
void ConsoleImpl::newline()
void ConsoleImpl::linefeed()
{
u16 new_row = m_cursor_row;
u16 max_row = rows() - 1;
@ -383,10 +383,6 @@ void VirtualConsole::scroll_up()
m_console_impl.m_need_full_flush = true;
}
void VirtualConsole::newline()
{
}
void VirtualConsole::clear_line(size_t y_index)
{
m_lines[y_index].dirty = true;