From a70adbfe655804008578c1a17ecddcd770e0cf7c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 17 Sep 2012 11:12:51 +0200 Subject: 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. --- osdep/getch2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'osdep/getch2.c') diff --git a/osdep/getch2.c b/osdep/getch2.c index cd8a198737..6b41514a9e 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -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 -- cgit v1.2.3