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.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 62cc662b5b..443b50da87 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -44,7 +44,8 @@ static struct {
int top, bot, left, right;
} sr;
static int current_attr_code = 0;
-static bool cursor_enabled = true, pending_cursor_update = false;
+static bool pending_cursor_update = false;
+static int busy = 0;
static int height, width;
// This set of macros allow us to use UI_CALL to invoke any function on
@@ -150,21 +151,17 @@ void ui_resize(int new_width, int new_height)
UI_CALL(resize, width, height);
}
-void ui_cursor_on(void)
+void ui_busy_start(void)
{
- if (!cursor_enabled) {
- UI_CALL(cursor_on);
- cursor_enabled = true;
+ if (!(busy++)) {
+ UI_CALL(busy_start);
}
}
-void ui_cursor_off(void)
+void ui_busy_stop(void)
{
- if (full_screen) {
- if (cursor_enabled) {
- UI_CALL(cursor_off);
- }
- cursor_enabled = false;
+ if (!(--busy)) {
+ UI_CALL(busy_stop);
}
}