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, 8 insertions, 2 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 81da88c54a..8aec923538 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -143,6 +143,12 @@ void ui_builtin_stop(void)
UI_CALL(stop);
}
+/// Returns true if UI `ui` is stopped.
+bool ui_is_stopped(UI *ui)
+{
+ return ui->data == NULL;
+}
+
bool ui_rgb_attached(void)
{
for (size_t i = 0; i < ui_count; i++) {
@@ -404,7 +410,7 @@ void ui_start_highlight(int attr_code)
{
current_attr_code = attr_code;
- if (!ui_count) {
+ if (!ui_active()) {
return;
}
@@ -415,7 +421,7 @@ void ui_stop_highlight(void)
{
current_attr_code = HL_NORMAL;
- if (!ui_count) {
+ if (!ui_active()) {
return;
}