Let Scintilla deal with some of the folding functionality

This commit is contained in:
dail8859 2016-02-19 17:48:16 -05:00 committed by Don Ho
parent 338b98dee8
commit 7d76a18ec8
2 changed files with 4 additions and 7 deletions

View File

@ -323,6 +323,10 @@ LRESULT Notepad_plus::init(HWND hwnd)
_mainEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH);
_subEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH);
// Let Scintilla deal with some of the folding functionality
_mainEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW);
_subEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW);
TabBarPlus::doDragNDrop(true);
if (_toReduceTabBar)

View File

@ -887,13 +887,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
case SCN_NEEDSHOWN:
{
int begin = notifyView->execute(SCI_LINEFROMPOSITION, notification->position);
int end = notifyView->execute(SCI_LINEFROMPOSITION, notification->position + notification->length);
int firstLine = begin < end ? begin : end;
int lastLine = begin > end ? begin : end;
for (int line = firstLine; line <= lastLine; ++line)
notifyView->execute(SCI_ENSUREVISIBLE, line, 0);
break;
}