Bug 310020 - git diff code folding incorrect
Summary: git diff code folding incorrect
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: 3.8.90
Platform: Debian testing All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2012-11-13 12:50 UTC by txomon
Modified: 2018-10-27 02:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description txomon 2012-11-13 12:50:31 UTC
If you make a git diff, output to a file and open it with kate, it folds the code in correctly (uses @@ starting lines as  toplevel instead of the ones starting with diff.

IMO the levels should be:
1st.- lines starting with diff --git
2nd.- lines starting with @@ without nesting them (that is another problem)

Reproducible: Always

Steps to Reproduce:
1. Open a git diff output file
2. Fold top level nodes (View-> Code Folding)
3. See what happens with ^diff lines and ^@@ lines.
Actual Results:  
that diff is nested under @@ and each @@ is nested under the previous @@

Expected Results:  
to have all ^diff starting lines and if I opened them, to have all ^@@ lines
Comment 1 Dominik Haumann 2012-11-14 08:33:53 UTC
Hi txomon, it would be cool if you provide us with a fix for this.
The syntax highlighting definition file for diffs is katepart/syntax/diff.xml

You can find documentation about how the synax highlighting works here:
 -http://docs.kde.org/stable/en/kde-baseapps/kate/katehighlight-system.html
 -http://docs.kde.org/stable/en/kde-baseapps/kate/katehighlight-xml-format.html
- http://docs.kde.org/stable/en/kde-baseapps/kate/kate-highlight-rules-detailled.html

Kate has more than 200 highlighting files, we ourselves are not able to fix /all/ of them, so we need your help ;)
Comment 2 txomon 2012-11-16 09:46:21 UTC
I have tried to fix it on my own but I didn't fully understand the .xml syntax. Will keep trying.
Comment 3 Andrew Crouthamel 2018-09-23 02:36:58 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-10-27 02:36:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!