mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
TTY: Properly implement echo in VirtualConsole.
VirtualConsole::echo now actually echoes characters instead of doing nothing.
This commit is contained in:
parent
ed45f67c00
commit
378480e8e4
2 changed files with 8 additions and 1 deletions
|
@ -545,6 +545,13 @@ StringView VirtualConsole::tty_name() const
|
|||
return m_tty_name;
|
||||
}
|
||||
|
||||
void VirtualConsole::echo(u8 ch)
|
||||
{
|
||||
if (should_echo_input()) {
|
||||
on_tty_write(&ch, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void VirtualConsole::set_vga_start_row(u16 row)
|
||||
{
|
||||
m_vga_start_row = row;
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
// ^TTY
|
||||
virtual ssize_t on_tty_write(const u8*, ssize_t) override;
|
||||
virtual StringView tty_name() const override;
|
||||
virtual void echo(u8) override { return; }
|
||||
virtual void echo(u8) override;
|
||||
|
||||
// ^CharacterDevice
|
||||
virtual const char* class_name() const override { return "VirtualConsole"; }
|
||||
|
|
Loading…
Add table
Reference in a new issue