From 720a3518e3d2eee745bee1d856c92e7c1d84549f Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Tue, 19 Dec 2023 18:20:03 +0200 Subject: refactor(runtime): rewrite 'vim' color scheme in Lua Problem: Bundled 'vim' color scheme is written in Vimscript which implicitly assumes that the file is ported from Vim. This is not the case, at it is currently the Neovim's way of providing backward compatibility for color schemes. Solution: Rewrite it in Lua to indicate that this runtime file comes from Neovim. --- test/functional/helpers.lua | 2 +- test/functional/ui/highlight_spec.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 449c3ab9d8..2e1f196226 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -41,7 +41,7 @@ module.nvim_argv = { -- Make screentest work after changing to the new default color scheme -- Source 'vim' color scheme without side effects -- TODO: rewrite tests - '--cmd', 'lua f=io.open("runtime/colors/vim.vim", "r"); l=f:read("*a"); f:close(); vim.api.nvim_exec2(l, {})', + '--cmd', 'lua dofile("runtime/colors/vim.lua")', '--cmd', 'unlet g:colors_name', '--embed'} diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index f5df11115c..d9ed66eb01 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -2381,6 +2381,7 @@ describe('highlight namespaces', function() end) it('Normal in set_hl #25474', function() + command('highlight Ignore guifg=bg ctermfg=White') meths.set_hl(0, 'Normal', {bg='#333333'}) command('highlight Ignore') screen:expect{grid=[[ -- cgit