diff --git a/userspace/programs/Terminal/Terminal.cpp b/userspace/programs/Terminal/Terminal.cpp index 4d6aba2b..fd5c2c26 100644 --- a/userspace/programs/Terminal/Terminal.cpp +++ b/userspace/programs/Terminal/Terminal.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -119,6 +120,14 @@ void Terminal::run() m_font = MUST(LibFont::Font::load("/usr/share/fonts/lat0-16.psfu"_sv)); + { + winsize winsize; + winsize.ws_col = cols(); + winsize.ws_row = rows(); + if (ioctl(m_shell_info.pts_master, TIOCSWINSZ, &winsize) == -1) + perror("ioctl"); + } + { timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);