[BUG_FIXED] Fix "Select and Find Next" and "Count" regressions.
[UPDATE] Adapt Scintilla 2.20 (making SCI_SETPROPERTIES call after SCI_SETLEXER call). git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@661 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
a1866aba6d
commit
247375f6cf
@ -290,6 +290,7 @@ void Notepad_plus::command(int id)
|
||||
TCHAR str[strSize];
|
||||
_pEditView->getGenericSelectedText(str, strSize);
|
||||
_findReplaceDlg.setSearchText(str);
|
||||
_findReplaceDlg._env->_str2Search = str;
|
||||
setFindReplaceFolderFilter(NULL, NULL);
|
||||
if (isFirstTime)
|
||||
_nativeLangSpeaker.changeFindReplaceDlgLang(_findReplaceDlg);
|
||||
|
@ -937,6 +937,11 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
||||
{
|
||||
if (_currentStatus == FIND_DLG)
|
||||
{
|
||||
bool isUnicode = (*_ppEditView)->getCurrentBuffer()->getUnicodeMode() != uni8Bit;
|
||||
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
|
||||
updateCombo(IDFINDWHAT);
|
||||
_options._str2Search = getTextFromCombo(hFindCombo, isUnicode);
|
||||
|
||||
int nbCounted = processAll(ProcessCountAll, &_options);
|
||||
generic_string result = TEXT("");
|
||||
|
||||
@ -2303,6 +2308,7 @@ void Finder::finishFilesSearch(int count)
|
||||
_scintView.execute(SCI_SETSEL, 0, 0);
|
||||
|
||||
_scintView.execute(SCI_SETLEXER, SCLEX_SEARCHRESULT);
|
||||
_scintView.execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -761,7 +761,8 @@ void ScintillaEditView::setCppLexer(LangType langType)
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.comment"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
|
||||
// "#if 1 //" make CppLexer crash, so we disable it.
|
||||
// Disable track preprocessor to avoid incorrect detection.
|
||||
// In the most of cases, the symbols are defined outside of file.
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("lexer.cpp.track.preprocessor"), reinterpret_cast<LPARAM>("0"));
|
||||
}
|
||||
|
||||
@ -872,6 +873,12 @@ void ScintillaEditView::setObjCLexer(LangType langType)
|
||||
execute(SCI_SETKEYWORDS, 2, (LPARAM)doxygenKeyWords);
|
||||
execute(SCI_SETKEYWORDS, 3, (LPARAM)objCDirective);
|
||||
execute(SCI_SETKEYWORDS, 4, (LPARAM)objCQualifier);
|
||||
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.compact"), reinterpret_cast<LPARAM>("0"));
|
||||
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.comment"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
}
|
||||
|
||||
void ScintillaEditView::setKeywords(LangType langType, const char *keywords, int index)
|
||||
@ -966,7 +973,6 @@ void ScintillaEditView::setLexer(int lexerID, LangType langType, int whichList)
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.compact"), reinterpret_cast<LPARAM>("0"));
|
||||
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.comment"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
}
|
||||
|
||||
void ScintillaEditView::makeStyle(LangType language, const TCHAR **keywordArray)
|
||||
|
@ -695,6 +695,8 @@ protected:
|
||||
execute(SCI_SETLEXER, SCLEX_PROPERTIES);
|
||||
execute(SCI_STYLESETEOLFILLED, SCE_PROPS_SECTION, true);
|
||||
makeStyle(L_INI);
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1"));
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.compact"), reinterpret_cast<LPARAM>("0"));
|
||||
};
|
||||
|
||||
|
||||
@ -713,6 +715,7 @@ protected:
|
||||
|
||||
void setPascalLexer() {
|
||||
setLexer(SCLEX_PASCAL, L_PASCAL, LIST_0);
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
};
|
||||
|
||||
void setPerlLexer() {
|
||||
@ -784,6 +787,7 @@ protected:
|
||||
|
||||
void setAutoItLexer(){
|
||||
setLexer(SCLEX_AU3, L_AU3, LIST_0 | LIST_1 | LIST_2 | LIST_3 | LIST_4 | LIST_5 | LIST_6);
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
};
|
||||
|
||||
void setCamlLexer(){
|
||||
@ -796,6 +800,7 @@ protected:
|
||||
|
||||
void setVerilogLexer(){
|
||||
setLexer(SCLEX_VERILOG, L_VERILOG, LIST_0 | LIST_1);
|
||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold.preprocessor"), reinterpret_cast<LPARAM>("1"));
|
||||
};
|
||||
|
||||
void setMatlabLexer(){
|
||||
|
@ -563,6 +563,10 @@ recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam)
|
||||
case IDD_FINDINFILES_DIR_COMBO:
|
||||
case IDD_FINDINFILES_FILTERS_COMBO:
|
||||
sParameter = *reinterpret_cast<TCHAR *>(lParameter);
|
||||
//::MessageBoxA(NULL, (LPCSTR)(*reinterpret_cast<char *>(lParameter)), "A", MB_OK);
|
||||
//::MessageBoxW(NULL, (LPCWSTR)(*reinterpret_cast<WCHAR *>(lParameter)), TEXT("W"), MB_OK);
|
||||
|
||||
//printStr(sParameter.c_str());
|
||||
MacroType = mtUseSParameter;
|
||||
lParameter = 0;
|
||||
break;
|
||||
@ -582,7 +586,7 @@ void recordedMacroStep::PlayBack(Window* pNotepad, ScintillaEditView *pEditView)
|
||||
{
|
||||
long lParam = lParameter;
|
||||
if (MacroType == mtUseSParameter)
|
||||
lParam = reinterpret_cast<long>(sParameter.c_str());
|
||||
lParam = reinterpret_cast<LPARAM>(sParameter.c_str());
|
||||
pEditView->execute(message, wParameter, lParam);
|
||||
if ( (message == SCI_SETTEXT)
|
||||
|| (message == SCI_REPLACESEL)
|
||||
|
Loading…
Reference in New Issue
Block a user