浏览代码

Merge pull request #417 from TheCosmotect/fnfind

Tweaked findBar’s functionList to not display any mention of ‘function’ that is not the start of a line
Ivan Safrin 12 年之前
父节点
当前提交
1692560548
共有 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);