aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metronome.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/metronome.c b/metronome.c
index 0c5202a..0fe8ff9 100644
--- a/metronome.c
+++ b/metronome.c
@@ -89,6 +89,9 @@ static int toggle_nonblocking_input()
}
free(saved_termios);
saved_termios = NULL;
+
+ /* restore cursor */
+ fprintf(stderr, "\033[?25h");
} else {
struct termios new_termios;
@@ -108,6 +111,9 @@ static int toggle_nonblocking_input()
if ((ret = tcsetattr(STDIN_FILENO, TCSANOW, &new_termios)) < 0) {
printf("Failed setting to changed termios: %s\n", strerror(errno));
}
+
+ /* disable cursor */
+ fprintf(stderr, "\033[?25l");
}
return ret;