From 5fb583f035bb8e699e8980e63050ef1f41f94dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 19 Mar 2017 12:53:08 +0100 Subject: view: use correct default cell style --- view.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/view.c b/view.c index 1f0ebc9..2f256ff 100644 --- a/view.c +++ b/view.c @@ -158,6 +158,8 @@ static void view_clear(View *view) { view->bottomline->next = NULL; view->line = view->topline; view->col = 0; + if (view->ui) + view->cell_blank.style = view->ui->style_get(view->ui, UI_STYLE_DEFAULT); } Filerange view_viewport_get(View *view) { @@ -532,7 +534,6 @@ View *view_new(Text *text) { void view_ui(View *view, UiWin* ui) { view->ui = ui; - view->cell_blank.style = view->ui->style_get(view->ui, UI_STYLE_DEFAULT); } static size_t cursor_set(Cursor *cursor, Line *line, int col) { @@ -851,10 +852,8 @@ void view_options_set(View *view, enum UiOption options) { view->large_file = (options & UI_OPTION_LARGE_FILE); - if (view->ui) { + if (view->ui) view->ui->options_set(view->ui, options); - view->cell_blank.style = view->ui->style_get(view->ui, UI_STYLE_DEFAULT); - } } enum UiOption view_options_get(View *view) { -- cgit v1.2.3