소스 검색

Tweaked findBar’s functionList to not display any mention of ‘function’ that is not the start of a line.

Ethan M 12 년 전
부모
커밋
0d16bb8afd
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      IDE/Contents/Source/PolycodeTextEditor.cpp

+ 4 - 1
IDE/Contents/Source/PolycodeTextEditor.cpp

@@ -610,7 +610,10 @@ void PolycodeTextEditor::showFindBar() {
 	for(int i=0; i < functionMatches.size(); i++) {
 		FindMatch *match = new FindMatch();
 		(*match) = functionMatches[i];
-		findBar->functionList->addComboItem(textInput->getLineText(functionMatches[i].lineNumber).replace("function ", ""), (void*) match);
+        String lineText = textInput->getLineText(functionMatches[i].lineNumber);
+        if (lineText.substr(0,8) == "function") {
+            findBar->functionList->addComboItem(lineText.replace("function ", ""), (void*) match);
+        }
 	}
 	
 	Resize(editorSize.x, editorSize.y);