From a527cc88f34e9190bf64b474b66378f8c94e3aa1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 21 Oct 2017 14:03:48 +0530 Subject: [PATCH] ... --- kitty/window.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kitty/window.py b/kitty/window.py index 625eceda5..5fb074857 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -65,6 +65,12 @@ def load_shader_programs(): init_cursor_program() +def setup_colors(screen, opts): + screen.color_profile.update_ansi_color_table(build_ansi_color_table(opts)) + screen.color_profile.set_configured_colors(*map(color_as_int, ( + opts.foreground, opts.background, opts.cursor, opts.selection_foreground, opts.selection_background))) + + class Window: def __init__(self, tab, child, opts, args): @@ -83,9 +89,7 @@ class Window: self.is_visible_in_layout = True self.child, self.opts = child, opts self.screen = Screen(self, 24, 80, opts.scrollback_lines, self.id) - self.screen.color_profile.update_ansi_color_table(build_ansi_color_table(opts)) - self.screen.color_profile.set_configured_colors(*map(color_as_int, ( - opts.foreground, opts.background, opts.cursor, opts.selection_foreground, opts.selection_background))) + setup_colors(self.screen, opts) def __repr__(self): return 'Window(title={}, id={})'.format(self.title, self.id)