Python Editor: Introduce simple folding

Mainly go by code indentation, ignoring empty lines.
Handle comment blocks at 0 as a special case.

Change-Id: Ibe5bef7286c640a2eea8b50140dae256b6635a56
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Friedemann Kleint
2017-09-12 13:57:54 +02:00
parent 67b4a7a872
commit d56becc808
2 changed files with 39 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ private:
void highlightBlock(const QString &text) override;
int highlightLine(const QString &text, int initialState);
void highlightImport(Internal::Scanner &scanner);
int m_lastIndent = 0;
bool withinLicenseHeader = false;
};
} // namespace Internal