Handle cursor_text_color that is already a Color when patching

This commit is contained in:
Kovid Goyal 2019-01-23 10:38:09 +05:30
parent d2431783f1
commit 6e94dae9cd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -960,7 +960,9 @@ class Boss:
if hasattr(self.opts, k):
setattr(self.opts, k, color_from_int(v))
if cursor_text_color is not False:
self.opts.cursor_text_color = color_from_int(cursor_text_color)
if isinstance(cursor_text_color, int):
cursor_text_color = color_from_int(cursor_text_color)
self.opts.cursor_text_color = cursor_text_color
for tm in self.all_tab_managers:
tm.tab_bar.patch_colors(spec)
patch_global_colors(spec, configured)