From 4860332233bb7ca7b635a0c9922546af559aa647 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 13 Jul 2020 15:22:04 -0400 Subject: Test setting styles directly via `lexer.styles`. Requires latest Scintilla for proper `lexer.colors` return types. --- src/Makefile | 2 +- test/test.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 232f097c..f5688a53 100644 --- a/src/Makefile +++ b/src/Makefile @@ -376,7 +376,7 @@ else gtdialog_url = http://foicica.com/hg/gtdialog/archive/tip.zip endif -scintilla_zip = d51c7ec9ec78.zip +scintilla_zip = 4e081ee8d750.zip lua_tgz = lua-5.3.5.tar.gz lpeg_tgz = lpeg-1.0.2.tar.gz lfs_zip = v1_7_0_2.zip diff --git a/test/test.lua b/test/test.lua index 3831fcfb..1ae3be7c 100644 --- a/test/test.lua +++ b/test/test.lua @@ -3097,6 +3097,9 @@ function test_set_lexer_style() assert(view.style_fore[style] ~= default_fore, 'function name style_fore same as default style_fore') view.style_fore[style] = view.style_fore[view.STYLE_DEFAULT] assert_equal(view.style_fore[style], default_fore) + assert(lexer.colors.orange > 0 and lexer.colors.orange ~= default_fore) + lexer.styles['function'] = {fore = lexer.colors.orange} + assert_equal(view.style_fore[style], lexer.colors.orange) buffer:close(true) -- Defined in Lua lexer, which is not currently loaded. assert(buffer:style_of_name('library'), view.STYLE_DEFAULT) -- cgit v1.2.3