Code Folding in Kate 3.10.0, no longer folds regions that begin and end with the same identifier. For example: beginRegion="aRegion" endRegion="aRegion" It worked nicely in Kate 3.3.5 and 3.7.2. Attached files: 1) kate-codefolding-unfolded.png - Shows how code folding appears unfolded on all versions of Kate mentioned above. 2) kate-3.7.2-codefolding-folded.png - Shows how code folding appears folded on 3.3.5 and 3.7.2. 3) kate-3.10.0-codefolding-folded.png - Shows how code folding appears folded on 3.10.0 4) katecodefoldingtest.txt - Sample text file used in images above. 5) katecodefoldingtest.xml - Sample Kate syntax file used in this test. 6) setup.sh - For your convenience, a Bash script to setup and test using the above xml and txt files. It basically adds/removes a symbolic link in "$(kde4-config --localprefix)share/apps/katepart/syntax/" and optionally starts Kate with the above txt file. Reproducible: Always Steps to Reproduce: 1. Use the katecodefoldingtest.xml file in the attachment. It is a shortened version that specifically demonstrates the problem. 2. Start kate. Open the attached sample file. 3. View -> Code Folding -> Fold Toplevel Nodes Actual Results: Everything folded into one level. Expected Results: Expected to see similar results as in Kate 3.3.5 and 3.7.2, which folded each region. Please see attachment.
Created attachment 79028 [details] tar file that contains multiple files described in the above bug report
I just tested this in Kate 4.13.0. Seems to work fine again. There is only one difference when comparing against the behaviour of 3.7.2: the line // kate: syntax KateCodeFoldingTest; folding-markers on; stays visible below "=== Simple Commands ===" (Which might be intended?) Do you still experience the problem?
Code folding is definitely producing similar results as in Kate 3.3.5 and 3.7.2, with the exception noted, plus a missing "Expand TopLevel" menu item. It does not appear to be isolated to katecodefoldingtest.txt and katecodefoldingtest.xml. I opened up the bash script, setup.sh, hovered over the code regions to see how far they stretched and also clicked "Collapse Toplevel". I got different results. Kate 4.13 does not include the end region in the fold, while previous versions did. For example: Kate 4.13: if.... fi Kate 3.3.5: if... The other item I noticed, there is no "Expand Toplevel" menu item. I have "Collapse Toplevel" and "Expand Toplevel" icons on Kate's Main Toolbar <KatePartView>. Click "Collapse Toplevel" and there's the highlevel structure of the document. And when done, click "Expand Toplevel". I only saw "Collapse Toplevel" in Kate 4.13, I did not see "Expand Toplevel".
Created attachment 86605 [details] Code folding in 4.13 vs 3.3.5 - end region
Created attachment 89937 [details] Missing Unfold Toplevel Nodes (previously vs Kate Ver 4.14.3) The actually code folding is working. Current environment openSUSE 13.2, Kate 4.13.3. But "unfold toplevel nodes" is missing. The keyboard shortcuts are ctrl+shift+- (FOLD) and ctrl+shift++ (UNFOLD). They are a toggle to fold and unfold the document. I also put toolbar buttons on the Main Toolbar <KatePartView> for these functions.
(In reply to prusselltechgroup from comment #5) > But "unfold toplevel nodes" is missing. Still missing in the view menu. Arch Linux 64-bit Kate 16.04.2 KDE Frameworks 5.22.0 Qt 5.6.1 xcb wm
> (In reply to prusselltechgroup from comment #5) > But "unfold toplevel nodes" is missing. This is reported as bug 335590
The missing menu item is still a "problem", therefore we have bug 335590, otherwise, the folding in KF5 based KTextEditor should be "OK".