From 37f01ccb6c5292529100ff2f46e0c7c0b12865c5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 7 Aug 2010 08:44:04 +1000 Subject: Made it possible to turn folding off again by looking at the "fold" property. --- lexlib/LexerSimple.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lexlib/LexerSimple.cxx') diff --git a/lexlib/LexerSimple.cxx b/lexlib/LexerSimple.cxx index 2e35f19c3..4d0e178ca 100644 --- a/lexlib/LexerSimple.cxx +++ b/lexlib/LexerSimple.cxx @@ -49,7 +49,9 @@ void SCI_METHOD LexerSimple::Lex(unsigned int startPos, int lengthDoc, int initS } void SCI_METHOD LexerSimple::Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) { - Accessor astyler(pAccess, &props); - module->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler); - astyler.Flush(); + if (props.GetInt("fold")) { + Accessor astyler(pAccess, &props); + module->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler); + astyler.Flush(); + } } -- cgit v1.2.3