浏览代码

!1 优化条件判断
Merge pull request !1 from Joker2770/master

爬山虎 2 年之前
父节点
当前提交
5ac07739af
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 1 4
      src/qscint/scintilla/lexers/LexAU3.cpp
  2. 3 0
      src/qscint/scintilla/lexers/LexMetapost.cpp

+ 1 - 4
src/qscint/scintilla/lexers/LexAU3.cpp

@@ -255,10 +255,7 @@ static void ColouriseAU3Doc(Sci_PositionU startPos,
 				if (sc.atLineEnd) {
 					ci=0;
 					if (strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0) {
-						if (sc.atLineEnd)
-							sc.SetState(SCE_AU3_DEFAULT);
-						else
-							sc.SetState(SCE_AU3_COMMENTBLOCK);
+						sc.SetState(SCE_AU3_DEFAULT);
 					}
 					break;
 				}

+ 3 - 0
src/qscint/scintilla/lexers/LexMetapost.cpp

@@ -175,6 +175,9 @@ static void ColouriseMETAPOSTDoc(
 	if (currentInterface != 0) {
 		extraInterface = currentInterface ;
 	}
+	else {
+		extraInterface = 1;
+	}
 
 	WordList &keywords  = *keywordlists[0] ;
 	WordList &keywords2 = *keywordlists[extraInterface-1] ;