Fix deleting the folded line makes folded (hidden) content disapeared

Applying the Scintilla flag SC_AUTOMATICFOLD_CHANGE, ref:
https://www.scintilla.org/ScintillaDoc.html#Folding

"SC_AUTOMATICFOLD_CHANGE (0x4) Show lines as needed when fold structure is changed. The SCN_MODIFIED notification is still sent unless it is disabled by the container."

Fix #11246, close #11280
This commit is contained in:
xomx 2022-02-23 22:24:54 +01:00 committed by Don Ho
parent c435625d32
commit ebabed554b
1 changed files with 2 additions and 2 deletions

View File

@ -331,8 +331,8 @@ LRESULT Notepad_plus::init(HWND hwnd)
_subEditView.execute(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true);
// Let Scintilla deal with some of the folding functionality
_mainEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW);
_subEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW);
_mainEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW | SC_AUTOMATICFOLD_CHANGE);
_subEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW | SC_AUTOMATICFOLD_CHANGE);
// Set padding info
_mainEditView.execute(SCI_SETMARGINLEFT, 0, svp._paddingLeft);