From 1e6a1f9921335bfd39f62b338a90dde41f2dbafb Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 1 Dec 2015 22:24:43 +0000 Subject: readline: set rl_outstream to /dev/null --- src/ui/inputwin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 06e055ea..4c8f1d60 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -74,6 +75,7 @@ static struct timeval p_rl_timeout; static gint inp_timeout = 0; static gint no_input_count = 0; +static FILE *discard; static fd_set fds; static int r; static char *inp_line = NULL; @@ -115,6 +117,8 @@ create_input_window(void) #else ESCDELAY = 25; #endif + discard = fopen("/dev/null", "a"); + rl_outstream = discard; rl_readline_name = "profanity"; rl_getc_function = _inp_rl_getc; rl_startup_hook = _inp_rl_startup_hook; @@ -222,6 +226,7 @@ void inp_close(void) { rl_callback_handler_remove(); + fclose(discard); } char* -- cgit 1.4.1-2-gfad0