[BUG_FIXED] Fix the localization switcher bug while w/o doLocalConf.xml.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@484 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2009-05-28 23:18:28 +00:00
parent 8c6ac82898
commit 1f33dd89f1
2 changed files with 8 additions and 5 deletions

View File

@ -592,12 +592,15 @@ bool NppParameters::reloadStylers(TCHAR *stylePath)
bool NppParameters::reloadLang()
{
TCHAR nativeLangPath[MAX_PATH];
lstrcpy(nativeLangPath, _userPath);
lstrcpy(nativeLangPath, _nppPath);
PathAppend(nativeLangPath, TEXT("nativeLang.xml"));
if (!PathFileExists(nativeLangPath))
{
return false;
lstrcpy(nativeLangPath, _userPath);
PathAppend(nativeLangPath, TEXT("nativeLang.xml"));
if (!PathFileExists(nativeLangPath))
return false;
}
if (_pXmlNativeLangDocA)

View File

@ -1087,10 +1087,10 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
{
if (getCurrentBuffer()->getUnicodeMode() == uni8Bit)
{
if (typeDoc != L_CSS || typeDoc != L_CAML || typeDoc != L_ASM || typeDoc != L_MATLAB)
execute(SCI_SETCODEPAGE, _codepage);
else
if (typeDoc == L_CSS || typeDoc == L_CAML || typeDoc == L_ASM || typeDoc == L_MATLAB)
execute(SCI_SETCODEPAGE, CP_ACP);
else
execute(SCI_SETCODEPAGE, _codepage);
}
}