From 7d4336e6653c46339403b8134719ba589017988a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Sun, 8 Sep 2024 08:32:21 +0200 Subject: [PATCH] LexVB: Add missing fold check (#271) --- lexers/LexVB.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lexers/LexVB.cxx b/lexers/LexVB.cxx index 1f47c029..cf625d06 100644 --- a/lexers/LexVB.cxx +++ b/lexers/LexVB.cxx @@ -363,6 +363,9 @@ void LexerVB::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, ID } void LexerVB::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) { + if (!options.fold) + return; + Accessor styler(pAccess, nullptr); const Sci_Position endPos = startPos + length;