stty(): Restore cursor as well, if it was hidden previously

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-10-19 17:52:00 +02:00
parent 9a98bff23f
commit e83dcafb02
+3
View File
@@ -115,6 +115,9 @@ void stty(int fd, speed_t speed)
term.c_cc[VKILL] = CTRL('U');
term.c_cc[VERASE] = CERASE;
tcsetattr(fd, TCSANOW, &term);
/* Restore cursor if it was hidden previously */
write(fd, "\033[?25h", 6);
}
/**