From 985fa654b97036a9ec15f50d22e95dff556d7eb9 Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 9 Apr 2018 00:35:53 +0200 Subject: [PATCH] Fix Javascript not working regression in Function list since 2016 due to 2 commits: 5d438aa fb189fa --- .../FunctionList/functionListPanel.cpp | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index 461097a2..17810e35 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -324,8 +324,8 @@ void FunctionListPanel::reload() Buffer* currentBuf = (*_ppEditView)->getCurrentBuffer(); const TCHAR *fn = currentBuf->getFileName(); LangType langID = currentBuf->getLangType(); - if (langID == L_JAVASCRIPT) - langID = L_JS; + if (langID == L_JS) + langID = L_JAVASCRIPT; const TCHAR *udln = NULL; if (langID == L_USER) @@ -343,25 +343,7 @@ void FunctionListPanel::reload() for (size_t i = 0, len = _foundFuncInfos.size(); i < len; ++i) { - // no 2 levels - /* - bool b = false; - if (b) - { - generic_string entryName = TEXT(""); - if (!_foundFuncInfos[i]._data2.empty()) - { - entryName = _foundFuncInfos[i]._data2; - entryName += TEXT("=>"); - } - entryName += _foundFuncInfos[i]._data; - addEntry(NULL, entryName.c_str(), _foundFuncInfos[i]._pos); - } - else - */ - { - addEntry(_foundFuncInfos[i]._data2.c_str(), _foundFuncInfos[i]._data.c_str(), _foundFuncInfos[i]._pos); - } + addEntry(_foundFuncInfos[i]._data2.c_str(), _foundFuncInfos[i]._data.c_str(), _foundFuncInfos[i]._pos); } HTREEITEM root = _treeView.getRoot();