This revision was automatically updated to reflect the committed changes.
Closed by commit R216:941f17e1a979: Fix end of folding region in rules with
lookAhead=true (authored by nibags, committed by cullmann).
REPOSITORY
R216 Syntax Highlighting
CHANGES SINCE LAST UPDATE
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.
I think that lookAhead rules don't publish their length sounds like a sane
improvement.
All in all, I think the folding still has some general issues in how we
handle it.
dhaumann added a comment.
Ok I see: this kind of reverts Christophs changes in the lookahead case.
What I wonder is whether we need a // TODO KF6: add a bool lookAhead in
applyFolding() such that we know whether a folding end region should end at 0
or at length.
@cullmann Your take
nibags added a comment.
Some highlighters use endRegion+lookAhead to determine the end of a region
when a new one starts, that is, they don't consider the text with
endRegion+lookAhead as part of the fold region. This behavior was present
before the implementation of KSyntaxHighlighting
nibags removed a reviewer: KTextEditor.
REPOSITORY
R216 Syntax Highlighting
REVISION DETAIL
https://phabricator.kde.org/D18516
To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, #ktexteditor
Cc: andreasgr, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham,
bruns,
dhaumann added a comment.
Interesting idea.
This changes all C/C++ Preprocessor #if/elsif/endif regions to empty code
folding regions.
What I plan on KTextEditor is the following feature: for code folding of e.g.
in LaTeX:
\begin{document}
\begin{center}
nibags edited the summary of this revision.
nibags added reviewers: Framework: Syntax Highlighting, cullmann, dhaumann,
KTextEditor.
REPOSITORY
R216 Syntax Highlighting
REVISION DETAIL
https://phabricator.kde.org/D18516
To: nibags, #framework_syntax_highlighting, cullmann, dhaumann,
nibags created this revision.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.
REPOSITORY
R216 Syntax Highlighting
BRANCH
fix-region-lookahead
REVISION DETAIL
https://phabricator.kde.org/D18516