[BUG_FIXED] Fix find/replace bug while doc mapper is opened.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@889 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
8c27c2a20d
commit
88ea280978
@ -2923,7 +2923,7 @@ void Notepad_plus::docGotoAnotherEditView(FileTransferMode mode)
|
||||
_pEditView->saveCurrentPos(); //allow copying of position
|
||||
buf->setPosition(buf->getPosition(_pEditView), _pNonEditView);
|
||||
_pNonEditView->restoreCurrentPos(); //set position
|
||||
activateBuffer(current, otherView());
|
||||
activateBuffer(current, viewToGo);
|
||||
}
|
||||
|
||||
//Open the view if it was hidden
|
||||
@ -4294,6 +4294,7 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
||||
if (_pDocMap)
|
||||
{
|
||||
_pDocMap->reloadMap();
|
||||
_pDocMap->setSyntaxLiliting();
|
||||
}
|
||||
|
||||
_linkTriggered = true;
|
||||
|
@ -36,10 +36,6 @@ void DocumentMap::reloadMap()
|
||||
Buffer *editBuf = (*_ppEditView)->getCurrentBuffer();
|
||||
_pScintillaEditView->setCurrentBuffer(editBuf);
|
||||
|
||||
// lexer
|
||||
_pScintillaEditView->defineDocType(editBuf->getLangType());
|
||||
_pScintillaEditView->showMargin(ScintillaEditView::_SC_MARGE_FOLDER, false);
|
||||
|
||||
// folding
|
||||
_pScintillaEditView->syncFoldStateWith((*_ppEditView)->getCurrentFoldStates());
|
||||
|
||||
@ -54,6 +50,12 @@ void DocumentMap::reloadMap()
|
||||
}
|
||||
|
||||
}
|
||||
void DocumentMap::setSyntaxLiliting()
|
||||
{
|
||||
Buffer *buf = _pScintillaEditView->getCurrentBuffer();
|
||||
_pScintillaEditView->defineDocType(buf->getLangType());
|
||||
_pScintillaEditView->showMargin(ScintillaEditView::_SC_MARGE_FOLDER, false);
|
||||
}
|
||||
|
||||
bool DocumentMap::needToRecomputeWith()
|
||||
{
|
||||
@ -244,23 +246,26 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
{
|
||||
HWND hwndScintilla = (HWND)::SendMessage(_hParent, NPPM_CREATESCINTILLAHANDLE, 0, (LPARAM)_hSelf);
|
||||
_pScintillaEditView = (ScintillaEditView *)::SendMessage(_hParent, NPPM_INTERNAL_GETSCINTEDTVIEW, 0, (LPARAM)hwndScintilla);
|
||||
::SendMessage(_pScintillaEditView->getHSelf(), SCI_SETZOOM, (WPARAM)-10, 0);
|
||||
::SendMessage(_pScintillaEditView->getHSelf(), SCI_SETVSCROLLBAR, FALSE, 0);
|
||||
::SendMessage(_pScintillaEditView->getHSelf(), SCI_SETHSCROLLBAR, FALSE, 0);
|
||||
reloadMap();
|
||||
_pScintillaEditView->execute(SCI_SETZOOM, (WPARAM)-10, 0);
|
||||
_pScintillaEditView->execute(SCI_SETVSCROLLBAR, FALSE, 0);
|
||||
_pScintillaEditView->execute(SCI_SETHSCROLLBAR, FALSE, 0);
|
||||
|
||||
_pScintillaEditView->showIndentGuideLine(false);
|
||||
_pScintillaEditView->display();
|
||||
|
||||
reloadMap();
|
||||
|
||||
_vzDlg.init(::GetModuleHandle(NULL), _hSelf);
|
||||
_vzDlg.doDialog();
|
||||
(NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 50); // 0 <= transparancy < 256
|
||||
|
||||
setSyntaxLiliting();
|
||||
|
||||
_pScintillaEditView->showMargin(0, false);
|
||||
_pScintillaEditView->showMargin(1, false);
|
||||
_pScintillaEditView->showMargin(2, false);
|
||||
_pScintillaEditView->showMargin(3, false);
|
||||
|
||||
_pScintillaEditView->display();
|
||||
|
||||
_vzDlg.init(::GetModuleHandle(NULL), _hSelf);
|
||||
_vzDlg.doDialog();
|
||||
(NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 50); // 0 <= transparancy < 256
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
|
@ -106,6 +106,7 @@ public:
|
||||
void scrollMap(bool direction, moveMode whichMode);
|
||||
void doMove();
|
||||
void fold(int line, bool foldOrNot);
|
||||
void setSyntaxLiliting();
|
||||
|
||||
protected:
|
||||
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user