[BUG_FIXED] Fix the crash bug while setting current document as Objective-C source code.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1187 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
abf23face0
commit
c297a35f3c
@ -940,11 +940,15 @@ void ScintillaEditView::setObjCLexer(LangType langType)
|
|||||||
}
|
}
|
||||||
const char *objCQualifier = getCompleteKeywordList(objcType2Kwl, langType, LANG_INDEX_TYPE2);
|
const char *objCQualifier = getCompleteKeywordList(objcType2Kwl, langType, LANG_INDEX_TYPE2);
|
||||||
|
|
||||||
const TCHAR *doxygenKeyWords_generic = _pParameter->getWordList(L_CPP, LANG_INDEX_TYPE2);
|
|
||||||
const char * doxygenKeyWords;
|
|
||||||
basic_string<char> doxygenKeyWordsString("");
|
basic_string<char> doxygenKeyWordsString("");
|
||||||
doxygenKeyWordsString = wstring2string(doxygenKeyWords_generic, CP_ACP);
|
const TCHAR *doxygenKeyWordsW = _pParameter->getWordList(L_CPP, LANG_INDEX_TYPE2);
|
||||||
doxygenKeyWords = doxygenKeyWordsString.c_str();
|
if (doxygenKeyWordsW)
|
||||||
|
{
|
||||||
|
doxygenKeyWordsString = wstring2string(doxygenKeyWordsW, CP_ACP);
|
||||||
|
}
|
||||||
|
const char *doxygenKeyWords = doxygenKeyWordsString.c_str();
|
||||||
|
|
||||||
execute(SCI_SETKEYWORDS, 0, (LPARAM)objcInstrs);
|
execute(SCI_SETKEYWORDS, 0, (LPARAM)objcInstrs);
|
||||||
execute(SCI_SETKEYWORDS, 1, (LPARAM)objcTypes);
|
execute(SCI_SETKEYWORDS, 1, (LPARAM)objcTypes);
|
||||||
@ -2188,13 +2192,9 @@ const char * ScintillaEditView::getCompleteKeywordList(std::basic_string<char> &
|
|||||||
kwl += " ";
|
kwl += " ";
|
||||||
const TCHAR *defKwl_generic = _pParameter->getWordList(langType, keywordIndex);
|
const TCHAR *defKwl_generic = _pParameter->getWordList(langType, keywordIndex);
|
||||||
|
|
||||||
#ifdef UNICODE
|
|
||||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||||
const char * defKwl = wmc->wchar2char(defKwl_generic, CP_ACP);
|
const char * defKwl = wmc->wchar2char(defKwl_generic, CP_ACP);
|
||||||
kwl += defKwl?defKwl:"";
|
kwl += defKwl?defKwl:"";
|
||||||
#else
|
|
||||||
kwl += defKwl_generic?defKwl_generic:"";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return kwl.c_str();
|
return kwl.c_str();
|
||||||
}
|
}
|
||||||
@ -2752,13 +2752,9 @@ void ScintillaEditView::hideLines() {
|
|||||||
|
|
||||||
void ScintillaEditView::setHiLiteResultWords(const TCHAR *keywords)
|
void ScintillaEditView::setHiLiteResultWords(const TCHAR *keywords)
|
||||||
{
|
{
|
||||||
#ifdef UNICODE
|
|
||||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||||
const char * word2search = wmc->wchar2char(keywords, CP_ACP);
|
const char * word2search = wmc->wchar2char(keywords, CP_ACP);
|
||||||
setKeywords(L_SEARCHRESULT, word2search, 0);
|
setKeywords(L_SEARCHRESULT, word2search, 0);
|
||||||
#else
|
|
||||||
setKeywords(L_SEARCHRESULT, keywords, 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScintillaEditView::markerMarginClick(int lineNumber) {
|
bool ScintillaEditView::markerMarginClick(int lineNumber) {
|
||||||
|
Loading…
Reference in New Issue
Block a user