From 7871c54db8fe2b8dcd1cb81aaec3b85099cb20a8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 13 Dec 2024 15:17:34 +0300 Subject: fixup 244a54a18b7db6af177c9d10f3224772f08d7484: abuse the Scintilla view's "identifier" to enable lexing in the container * SCI_SETILEXER(NULL) is not a reliable way to do that since that's the default for all views. * This was breaking the git.tes lexer for instance and was unnecessarily driving teco_lexer_style() on plain-text documents. * Since we currently do not implement the ILexer5 C++ interface and teco_view_t is just a pointer alias, we are abusing the view's "identifier" instead. This is probably sufficient, as long as there is only one lexer "in the container". Otherwise, there should perhaps be a single C++ class that does nothing but wrapping a callback into an ILexer5 object with a C ABI. --- lib/lexers/sciteco.tes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lexers/sciteco.tes b/lib/lexers/sciteco.tes index 058e79d..129b150 100644 --- a/lib/lexers/sciteco.tes +++ b/lib/lexers/sciteco.tes @@ -8,7 +8,7 @@ } @[lexer.set.sciteco]{ - ESSETILEXERsciteco + 1ESSETIDENTIFIER !*:M[color.keyword],1M[color.set]*! :M[color.operator],2M[color.set] :M[color.variable],3M[color.set] -- cgit v1.2.3