]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/scintilla/src/LexAVE.cxx
fixed scaling of print preview if there's not enough RAM for the full page
[wxWidgets.git] / src / stc / scintilla / src / LexAVE.cxx
index 900aea317cfedb83d63b87269714b81326185bd0..2b7029b1ac700c715f0ed954fe7898c4bb530a6c 100644 (file)
@@ -12,7 +12,6 @@
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>
-#include <fcntl.h>
 
 #include "Platform.h"
 
@@ -23,6 +22,9 @@
 #include "Scintilla.h"
 #include "SciLexer.h"
 
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
 
 
 static inline bool IsAWordChar(const int ch) {
@@ -183,7 +185,9 @@ static void FoldAveDoc(unsigned int startPos, int length, int /* initStyle */, W
                                if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) {
                                        levelCurrent++;
                                }
-                               if ((strcmp(s, "end") == 0)) {
+                               if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) {
+                                       // Normally "elseif" and "then" will be on the same line and will cancel
+                                       // each other out.  // As implemented, this does not support fold.at.else.
                                        levelCurrent--;
                                }
                        }