aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/env.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-04 15:26:32 +0200
committerGitHub <noreply@github.com>2017-04-04 15:26:32 +0200
commit4566f7c7cda2c3a181ec58998f7c93dd17500153 (patch)
tree049ef60e8dd071342b5c075592c035715d676fef /src/nvim/os/env.c
parent9d560d5c6b02d34690ca47ee6f32e31ee4a6d90e (diff)
parenta7f34e199144bfb657c180cdc1413093fd34bdf9 (diff)
downloadrneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.tar.gz
rneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.tar.bz2
rneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.zip
Merge #6432 from justinmk/guicursor
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r--src/nvim/os/env.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 1a97adfa21..839e0d1b51 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -889,3 +889,17 @@ bool os_setenv_append_path(const char *fname)
}
return false;
}
+
+/// Returns true if the terminal can be assumed to silently ignore unknown
+/// control codes.
+bool os_term_is_nice(void)
+{
+#if defined(__APPLE__) || defined(WIN32)
+ return true;
+#else
+ const char *vte_version = os_getenv("VTE_VERSION");
+ return (vte_version && atoi(vte_version) >= 3900)
+ || NULL != os_getenv("KONSOLE_PROFILE_NAME")
+ || NULL != os_getenv("KONSOLE_DBUS_SESSION");
+#endif
+}