Hi all,
I have been doing some recent testing on writing scripts to change
and customize styles in Lua scripts. Running SciTE 1.67+ on Win32,
self-compiled using Mingw. When I try the following
function test()
editor.Lexer = SCLEX_PERL;
editor.StyleFore[10] = 255*256
editor:StartStyling(0, 31)
editor:Colourise(0, -1)
end
on a convenient SciTEStartup.lua as the test document,
(a) the first time the function runs, colours etc. change as the
document is lexed using the Perl lexer, but using Lua visual
styles. Also, the operators flashed green for an instant;
(b) the second time the function runs, all operators turn green,
as is intended by assignment to editor.StyleFore[10].
My question is, shouldn't the green operator style appear
immediately, the first time test() is called? I have taken a
cursory look at the various calls involved, like RefreshStyleData,
InvalidateStyleRedraw and InvalidateStyleData, but so far I
haven't found out why this happens. Any ideas?
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest