aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index ef0386e395..d13c7e5feb 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -114,6 +114,16 @@ void ui_write(uint8_t *s, int len)
free(tofree);
}
+bool ui_rgb_attached(void)
+{
+ for (size_t i = 0; i < ui_count; i++) {
+ if (uis[i]->rgb) {
+ return true;
+ }
+ }
+ return false;
+}
+
/*
* If the machine has job control, use it to suspend the program,
* otherwise fake it by starting a new shell.