[NEW] Adding find in files filters supports user defined language.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@403 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2009-01-25 12:46:23 +00:00
parent e64e4309ab
commit ab4ae49c8a
2 changed files with 15 additions and 2 deletions

View File

@ -7107,7 +7107,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
dir = (const TCHAR *)wParam; dir = (const TCHAR *)wParam;
else else
{ {
dir = NppParameters::getInstance()->getWorkingDir(); dir = pNppParam->getWorkingDir();
} }
if (lParam) if (lParam)
@ -7116,9 +7116,21 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
} }
else else
{ {
const TCHAR *ext = NULL;
LangType lt = _pEditView->getCurrentBuffer()->getLangType(); LangType lt = _pEditView->getCurrentBuffer()->getLangType();
if (lt == L_USER)
{
Buffer * buf = _pEditView->getCurrentBuffer();
UserLangContainer * userLangContainer = pNppParam->getULCFromName(buf->getUserDefineLangName());
if (userLangContainer)
ext = userLangContainer->getExtention();
}
else
{
ext = NppParameters::getInstance()->getLangExtFromLangType(lt);
}
const TCHAR *ext = NppParameters::getInstance()->getLangExtFromLangType(lt);
if (ext && ext[0]) if (ext && ext[0])
{ {
generic_string filtres = TEXT(""); generic_string filtres = TEXT("");

View File

@ -755,6 +755,7 @@ public :
int getNbKeywordList() {return nbKeywodList;}; int getNbKeywordList() {return nbKeywodList;};
const TCHAR * getName() {return _name.c_str();}; const TCHAR * getName() {return _name.c_str();};
const TCHAR * getExtention() {return _ext.c_str();};
private: private:
generic_string _name; generic_string _name;