diff options
author | Pavel Platto <hinidu@gmail.com> | 2014-04-16 09:21:19 +0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-20 10:37:52 -0300 |
commit | aea2e2cb126bf92e729b88013fd03b55ee4b3399 (patch) | |
tree | 581420b130e9896eff3d8dc0d4ec4d9aa74ae183 | |
parent | a848fad656505c44983b606d7b484869b33dac56 (diff) | |
download | rneovim-aea2e2cb126bf92e729b88013fd03b55ee4b3399.tar.gz rneovim-aea2e2cb126bf92e729b88013fd03b55ee4b3399.tar.bz2 rneovim-aea2e2cb126bf92e729b88013fd03b55ee4b3399.zip |
Removed mch_input_isatty
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/os_unix.c | 10 | ||||
-rw-r--r-- | src/os_unix.h | 1 |
3 files changed, 3 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c index e5958e74a6..b2295ea0be 100644 --- a/src/main.c +++ b/src/main.c @@ -8,6 +8,7 @@ #define EXTERN #include <string.h> +#include <stdbool.h> #include "vim.h" #include "main.h" @@ -1624,9 +1625,8 @@ static void handle_tag(char_u *tagname) */ static void check_tty(mparm_T *parmp) { - int input_isatty; /* is active input a terminal? */ - - input_isatty = mch_input_isatty(); + // is active input a terminal? + bool input_isatty = os_isatty(read_cmd_fd); if (exmode_active) { if (!input_isatty) silent_mode = TRUE; diff --git a/src/os_unix.c b/src/os_unix.c index 6743b1a993..4a32d77d8c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -182,16 +182,6 @@ void mch_init() event_init(); } -/* - * Return TRUE if the input comes from a terminal, FALSE otherwise. - */ -int mch_input_isatty() -{ - if (isatty(read_cmd_fd)) - return TRUE; - return FALSE; -} - static int get_x11_title(int test_only) { return FALSE; diff --git a/src/os_unix.h b/src/os_unix.h index 88a895e670..e3f5df887f 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -7,7 +7,6 @@ void mch_write(char_u *s, int len); void mch_suspend(void); void mch_init(void); -int mch_input_isatty(void); int mch_can_restore_title(void); int mch_can_restore_icon(void); void mch_settitle(char_u *title, char_u *icon); |