1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

Kernel: Perform output processing on echo

Previously, we would echo characters back just as they were passed to
us, even in canonical mode. This caused newlines to not work correctly
in some programs.

Fixes #7802
This commit is contained in:
Daniel Bertalan 2021-06-05 12:39:02 +02:00 committed by Andreas Kling
parent 42fcc2219d
commit 169e93f0a7
2 changed files with 32 additions and 13 deletions

View file

@ -80,6 +80,10 @@ protected:
private:
// ^CharacterDevice
virtual bool is_tty() const final override { return true; }
inline void echo_with_processing(u8);
template<typename Functor>
void process_output(u8, Functor put_char);
CircularDeque<u8, TTY_BUFFER_SIZE> m_input_buffer;
// FIXME: use something like AK::Bitmap but which takes a size template parameter