--- a/eric7/QScintilla/MiniEditor.py Mon May 17 19:58:15 2021 +0200 +++ b/eric7/QScintilla/MiniEditor.py Tue May 18 18:19:47 2021 +0200 @@ -2861,8 +2861,6 @@ self.__textEdit.setMarginWidth(2, 16) if Preferences.getEditor("FoldingMargin"): folding = Preferences.getEditor("FoldingStyle") - with contextlib.suppress(AttributeError): - folding = QsciScintilla.FoldStyle(folding) self.__textEdit.setFolding(folding) self.__textEdit.setFoldMarginColors( Preferences.getEditorColour("FoldmarginBackground"), @@ -2871,7 +2869,8 @@ Preferences.getEditorColour("FoldMarkersForeground"), Preferences.getEditorColour("FoldMarkersBackground")) else: - self.__textEdit.setFolding(QsciScintilla.FoldStyle.NoFoldStyle) + self.__textEdit.setFolding( + QsciScintilla.FoldStyle.NoFoldStyle.value) def __resizeLinenoMargin(self): """