aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-12-12 16:25:11 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-01-10 21:41:31 -0300
commit4f5f246a958e66e04a5d62b3bf0d8986afb51c09 (patch)
tree7bafd201edc44c22a39003a43a51ced1983917c2 /src/nvim/ui.c
parent209b5ed6ba76fe28c5ec7e1c7b38f77c1fa53250 (diff)
downloadrneovim-4f5f246a958e66e04a5d62b3bf0d8986afb51c09.tar.gz
rneovim-4f5f246a958e66e04a5d62b3bf0d8986afb51c09.tar.bz2
rneovim-4f5f246a958e66e04a5d62b3bf0d8986afb51c09.zip
ui: Add update_fg/update_bg methods
It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 9c58193e8c..b37bc92b1a 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -113,6 +113,18 @@ void ui_write(uint8_t *s, int len)
free(tofree);
}
+void ui_fg_updated(void)
+{
+ UI_CALL(update_fg, normal_fg);
+ UI_CALL(flush);
+}
+
+void ui_bg_updated(void)
+{
+ UI_CALL(update_bg, normal_bg);
+ UI_CALL(flush);
+}
+
/*
* If the machine has job control, use it to suspend the program,
* otherwise fake it by starting a new shell.
@@ -167,6 +179,8 @@ void ui_cursor_shape(void)
void ui_resize(int width, int height)
{
+ ui_fg_updated();
+ ui_bg_updated();
sr.top = 0;
sr.bot = height - 1;
sr.left = 0;