[terminal] Do not discard the input when turning the terminal unbuffered

Drawing to renderers was resetting the terminal to unbuffered, but this was
also discarding any queued input keys. The fix should keep the input buffer
untouched.
This commit is contained in:
Charlie Brej 2010-03-31 19:16:36 +01:00
parent f83e2bb5e1
commit 0664bce5fd

View file

@ -182,7 +182,7 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal)
/* Make \n return go to the beginning of the next line */
term_attributes.c_oflag |= ONLCR;
if (tcsetattr (terminal->fd, TCSAFLUSH, &term_attributes) != 0)
if (tcsetattr (terminal->fd, TCSANOW, &term_attributes) != 0)
return false;
terminal->is_unbuffered = true;