Skip to content

Commit

Permalink
[BUG_FIXED] Fix folding margin to be displayed when opening Notepad++…
Browse files Browse the repository at this point in the history
… with a new/empty file (Normal text).

- Notepad-plus svn trunk @ 721
  • Loading branch information
donho committed Dec 5, 2010
1 parent 0059325 commit 2c4231e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 3 additions & 12 deletions PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ LRESULT Notepad_plus::init(HWND hwnd)
//Marker Margin config
_mainEditView.setMakerStyle(svp1._folderStyle);
_subEditView.setMakerStyle(svp1._folderStyle);
_mainEditView.defineDocType(_mainEditView.getCurrentBuffer()->getLangType());
_subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType());

//Line wrap method
_mainEditView.setWrapMode(svp1._lineWrapMethod);
Expand Down Expand Up @@ -1920,12 +1922,9 @@ void Notepad_plus::MaintainIndentation(TCHAR ch)
}
}
}
void Notepad_plus::specialCmd(int id/*, int param*/)
void Notepad_plus::specialCmd(int id)
{
//if ((param != 1) && (param != 2)) return;

NppParameters *pNppParam = NppParameters::getInstance();
//ScintillaEditView *pEditView = (param == 1)?&_mainEditView:&_subEditView;

switch (id)
{
Expand All @@ -1938,15 +1937,7 @@ void Notepad_plus::specialCmd(int id/*, int param*/)
margin = ScintillaEditView::_SC_MARGE_LINENUMBER;
else //if (id == IDM_VIEW_SYMBOLMARGIN)
margin = ScintillaEditView::_SC_MARGE_SYBOLE;
/*
else if (id == IDM_VIEW_DOCCHANGEMARGIN)
{
margin = ScintillaEditView::_SC_MARGE_MODIFMARKER;
}

else
margin = ScintillaEditView::_SC_MARGE_FOLDER;
*/
if (_mainEditView.hasMarginShowed(margin))
{
_mainEditView.showMargin(margin, false);
Expand Down
2 changes: 0 additions & 2 deletions PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,6 @@ void FindReplaceDlg::findAllIn(InWhat op)
_pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLE, 1);
_pFinder->_scintView.execute(SCI_SETCARETWIDTH, 0);
_pFinder->_scintView.showMargin(ScintillaEditView::_SC_MARGE_FOLDER, true);
//_pFinder->_scintView.execute(SCI_SETEOLMODE, SC_EOL_CRLF); // yniq - needed?

// get the width of FindDlg
RECT findRect;
Expand All @@ -1738,7 +1737,6 @@ void FindReplaceDlg::findAllIn(InWhat op)
// Send the address of _MarkingsStruct to the lexer
char ptrword[sizeof(void*)*2+1];
sprintf(ptrword, "%p", &_pFinder->_MarkingsStruct);
//_pFinder->_scintView.execute(SCI_SETKEYWORDS, 0, (LPARAM) ptrword);
_pFinder->_scintView.execute(SCI_SETPROPERTY, (WPARAM)"@MarkingsStruct", (LPARAM)ptrword);
}

Expand Down

0 comments on commit 2c4231e

Please sign in to comment.