aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>2017-05-03 19:47:03 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-05-04 16:18:36 +0200
commit052c2d0a0f68a210038123608c00d4e0ff360161 (patch)
treee4b18e7488346a176e0cb5a625bd13021ccc0c36 /test
parent3c0cc028b7e787e3e87f21976d8b6333bf488219 (diff)
downloadrneovim-052c2d0a0f68a210038123608c00d4e0ff360161.tar.gz
rneovim-052c2d0a0f68a210038123608c00d4e0ff360161.tar.bz2
rneovim-052c2d0a0f68a210038123608c00d4e0ff360161.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/tui_spec.lua12
1 files changed, 10 insertions, 2 deletions
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