From a56bf04ea082a26a601694d36051fd2c29b8fe20 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 16 Oct 2006 23:41:44 +0000 Subject: Fold on !if. --- src/LexNsis.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/LexNsis.cxx b/src/LexNsis.cxx index 6a7274ef5..ddbc8a83d 100644 --- a/src/LexNsis.cxx +++ b/src/LexNsis.cxx @@ -120,7 +120,7 @@ static int calculateFoldNsis(unsigned int start, unsigned int end, int foldlevel return foldlevel; } else - { + { if( style != SCE_NSIS_FUNCTIONDEF && style != SCE_NSIS_SECTIONDEF && style != SCE_NSIS_SUBSECTIONDEF && style != SCE_NSIS_SECTIONGROUP && style != SCE_NSIS_PAGEEX ) @@ -141,7 +141,7 @@ static int calculateFoldNsis(unsigned int start, unsigned int end, int foldlevel if( s[0] == '!' ) { - if( NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!macro", bIgnoreCase ) == 0 ) + if( NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!if", bIgnoreCase ) == 0 || NsisCmp(s, "!macro", bIgnoreCase ) == 0 ) newFoldlevel++; else if( NsisCmp(s, "!endif", bIgnoreCase) == 0 || NsisCmp(s, "!macroend", bIgnoreCase ) == 0 ) newFoldlevel--; @@ -155,7 +155,7 @@ static int calculateFoldNsis(unsigned int start, unsigned int end, int foldlevel else if( NsisCmp(s, "SectionGroupEnd", bIgnoreCase ) == 0 || NsisCmp(s, "SubSectionEnd", bIgnoreCase ) == 0 || NsisCmp(s, "FunctionEnd", bIgnoreCase) == 0 || NsisCmp(s, "SectionEnd", bIgnoreCase ) == 0 || NsisCmp(s, "PageExEnd", bIgnoreCase ) == 0 ) newFoldlevel--; } - + return newFoldlevel; } -- cgit v1.2.3