From 052c2d0a0f68a210038123608c00d4e0ff360161 Mon Sep 17 00:00:00 2001 From: Jonathan de Boyne Pollard Date: Wed, 3 May 2017 19:47:03 +0100 Subject: tui: Also fix "linux*" terminfo entries. #6673 The terminfo entry for linux only advertises 8 colours, but nvim tries to make it display 16 colours anyway, resulting in erroneous SGR control sequences for colours 8 and above. The Linux kernel terminal emulator itself has actually understood the 256-colour control sequences since version 4.8 and the 16-colour control sequences since version 4.9. Thus we apply the same terminfo fixup as we apply for *xterm* and *256*, to emit the 16-colour and 256-colour control sequences even if terminfo's setaf and setab do not advertise them. --- test/functional/terminal/tui_spec.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index b14bceecdd..3ed63f68e9 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -356,9 +356,17 @@ describe("tui 't_Co' (terminal colors)", function() assert_term_colors("yet-another-term", "screen-256color", 256) end) - it("TERM=linux uses 8 colors", function() + it("TERM=linux uses 256 colors", function() if is_linux then - assert_term_colors("linux", nil, 8) + assert_term_colors("linux", nil, 256) + else + pending() + end + end) + + it("TERM=linux-16color uses 256 colors", function() + if is_linux then + assert_term_colors("linux-16color", nil, 256) else pending() end -- cgit