Let Scintilla deal with some of the folding functionality

pull/1574/merge
dail8859 9 years ago committed by Don Ho
parent 338b98dee8
commit 7d76a18ec8

@ -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)

@ -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;
}

Loading…
Cancel
Save