Let Scintilla deal with some of the folding functionality
This commit is contained in:
parent
338b98dee8
commit
7d76a18ec8
@ -323,6 +323,10 @@ LRESULT Notepad_plus::init(HWND hwnd)
|
|||||||
_mainEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH);
|
_mainEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH);
|
||||||
_subEditView.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);
|
TabBarPlus::doDragNDrop(true);
|
||||||
|
|
||||||
if (_toReduceTabBar)
|
if (_toReduceTabBar)
|
||||||
|
@ -887,13 +887,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_NEEDSHOWN:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user