Terminal: Set terminal size with TIOCSWINSZ when starting
This actually fixes the very broken vim port
This commit is contained in:
parent
69137cddab
commit
6f8f99f42c
|
@ -6,6 +6,7 @@
|
|||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/select.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue