XON has to be sent before restoring c_iflag

This commit is contained in:
Daniel Micay 2012-07-11 17:45:59 -04:00
parent 53c1e6cd50
commit 9bdf88c84a
1 changed files with 2 additions and 1 deletions

View File

@ -140,6 +140,8 @@ static void start_selection(VteTerminal *vte, select_info *select) {
static void end_selection(VteTerminal *vte, select_info *select) {
feed_str(vte, CSI "?25h"); // show cursor
vte_terminal_feed_child(vte, "\x11", 1); // resume output (XON)
// restore c_iflag
int fd = vte_pty_get_fd(vte_terminal_get_pty_object(vte));
struct termios t;
@ -147,7 +149,6 @@ static void end_selection(VteTerminal *vte, select_info *select) {
t.c_iflag = select->ciflag_old;
tcsetattr(fd, TCSANOW, &t);
vte_terminal_feed_child(vte, "\x11", 1); // resume output (XON)
vte_terminal_select_none(vte);
select->mode = SELECT_OFF;
}