mirror of https://github.com/mpv-player/mpv
getch2: request at least 1 byte of input each read
fixes issue with | less, where mplayer broke less's terminal expectations and made less quit Note this means that read() will be blocking again. Should be ok, as we always check via select() before reading.
This commit is contained in:
parent
020a954b60
commit
a70adbfe65
|
@ -292,7 +292,7 @@ static void do_enable_getch2(void)
|
|||
struct termios tio_new;
|
||||
tcgetattr(0,&tio_new);
|
||||
tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
|
||||
tio_new.c_cc[VMIN] = 0;
|
||||
tio_new.c_cc[VMIN] = 1;
|
||||
tio_new.c_cc[VTIME] = 0;
|
||||
tcsetattr(0,TCSANOW,&tio_new);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue