aboutsummaryrefslogtreecommitdiff
path: root/src/os/input.c
diff options
context:
space:
mode:
authorPavel Platto <hinidu@gmail.com>2014-04-16 08:58:09 +0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-20 10:37:52 -0300
commit096eadbcbb224e9d0febacfad571a9c25934f151 (patch)
tree327a4eadad37aa064e3a80bac9bb32b03395dee0 /src/os/input.c
parentb8364da582dfe32be322ae60459906195381e8e4 (diff)
downloadrneovim-096eadbcbb224e9d0febacfad571a9c25934f151.tar.gz
rneovim-096eadbcbb224e9d0febacfad571a9c25934f151.tar.bz2
rneovim-096eadbcbb224e9d0febacfad571a9c25934f151.zip
Added os_isatty
Diffstat (limited to 'src/os/input.c')
-rw-r--r--src/os/input.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os/input.c b/src/os/input.c
index e0a00e006a..5143729698 100644
--- a/src/os/input.c
+++ b/src/os/input.c
@@ -124,6 +124,11 @@ void os_breakcheck()
fill_input_buf(false);
}
+bool os_isatty(int fd)
+{
+ return uv_guess_handle(fd) == UV_TTY;
+}
+
// This is a replacement for the old `WaitForChar` function in os_unix.c
static InbufPollResult inbuf_poll(int32_t ms)
{