diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 6d24ef6d..fc09bb25 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -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) diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index ca383153..ca7d2f3e 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -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; }