From 5d8da126d0b5ab7f550a74264ba434a2ad04280e Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Tue, 6 Feb 2018 19:46:45 +0100 Subject: ui/tui: highlighting refactor Make HlAttr contain highlighting state for both color modes (cterm and rgb). This allows us to implement termguicolors completely in the TUI. Simplify some logic duplicated between ui.c and screen.c. Also avoid some superfluous highlighting reset events. --- test/functional/terminal/tui_spec.lua | 4 ++-- test/functional/ui/screen.lua | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index a62c03b70f..171745eb57 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -242,7 +242,7 @@ describe('tui', function() {9:~ }| {9:~ }| {3:[No Name] [+] }| - | + :set termguicolors | {4:-- TERMINAL --} | ]]) @@ -253,7 +253,7 @@ describe('tui', function() {2:~ }| {2:~ }| {3:[No Name] [+] }| - | + :set notermguicolors | {4:-- TERMINAL --} | ]]) end) diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 696feabeed..52e108f389 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -455,6 +455,9 @@ function Screen:_handle_visual_bell() self.visual_bell = true end +function Screen:_handle_default_colors_set() +end + function Screen:_handle_update_fg(fg) self._fg = fg end -- cgit