summaryrefslogtreecommitdiff
path: root/src/fe-text/statusbar-items.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/statusbar-items.c')
-rw-r--r--src/fe-text/statusbar-items.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c
index 878034d4..ac98c77a 100644
--- a/src/fe-text/statusbar-items.c
+++ b/src/fe-text/statusbar-items.c
@@ -347,7 +347,8 @@ static void item_input(SBAR_ITEM_REC *item, int get_size_only)
rec = g_hash_table_lookup(input_entries, item);
if (rec == NULL) {
rec = gui_entry_create(item->xpos, item->bar->real_ypos,
- item->size);
+ item->size,
+ settings_get_bool("term_utf8"));
gui_entry_set_active(rec);
g_hash_table_insert(input_entries, item, rec);
}
@@ -374,6 +375,14 @@ static void sig_statusbar_item_destroyed(SBAR_ITEM_REC *item)
}
}
+static void read_settings(void)
+{
+ if (active_entry != NULL) {
+ gui_entry_set_utf8(active_entry,
+ settings_get_bool("term_utf8"));
+ }
+}
+
void statusbar_items_init(void)
{
settings_add_int("misc", "lag_min_show", 100);
@@ -413,6 +422,9 @@ void statusbar_items_init(void)
input_entries = g_hash_table_new((GHashFunc) g_direct_hash,
(GCompareFunc) g_direct_equal);
signal_add("statusbar item destroyed", (SIGNAL_FUNC) sig_statusbar_item_destroyed);
+
+ read_settings();
+ signal_add("setup changed", (SIGNAL_FUNC) read_settings);
}
void statusbar_items_deinit(void)
@@ -441,4 +453,6 @@ void statusbar_items_deinit(void)
/* input */
signal_remove("statusbar item destroyed", (SIGNAL_FUNC) sig_statusbar_item_destroyed);
g_hash_table_destroy(input_entries);
+
+ signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
}