aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1b6f14d..7bab3cd 100644
--- a/main.c
+++ b/main.c
@@ -2280,7 +2280,7 @@ int main(int argc, char *argv[]) {
if (len == -1)
vis_die(vis, "Can not read from stdin\n");
text_snapshot(txt);
- int fd = open("/dev/tty", O_RDONLY);
+ int fd = open("/dev/tty", O_RDWR);
if (fd == -1)
vis_die(vis, "Can not reopen stdin\n");
dup2(fd, STDIN_FILENO);