Bug 54284

Summary: always fold into one line
Product: [Applications] kate Reporter: Jens Dagerbo <jens.dagerbo>
Component: kwriteAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jens Dagerbo 2003-02-08 08:51:35 UTC
Version:           4.1 (using KDE 3.1.0)
Installed from:    compiled sources
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20-gentoo-r1

I'm starting to like code folding, but there are a few things about how it works that I would like different. (This is a wish, after all. :) )

void func() {
}

and 

void func()
{
}

doesn't fold into the same thing. This makes it somewhat confusing when both syntaxes are used in the same file (which shouldn't happen, but does) and in either case when one regularly happen upon both ways.

Personally, I'd like to see it fold into only one line, which is what happens to case one. Preferably with both brackets removed. 

This would also be consistent with how comments are folded into one line.

Also (which perhaps should have been a different wishitem) if the folded line could be presented differently somehow, to make it stand out a little more than just the + does. Maybe a different background color?
Comment 1 Jens Dagerbo 2003-02-08 08:53:43 UTC
Ok, it was _supposed_ to be a wish, not a bug. I guess I fumbled... 
Comment 2 Hamish Rodda 2003-02-08 09:20:28 UTC
Hi Jens, 
 
What you are asking for requires kate to do quite advanced syntax processing, which is much 
more the domain of kdevelop & friends.  Additionally using the kdevelop code to implement this 
would still be quite difficult (and folding has a few bugs as it is). 
 
For the benefits it would provide (not much, I'd hope you agree) this is a mammoth amount of 
work, so I don't think it's going to happen, sorry. 
 
There is some good news: in the upcoming version of KDE, I have already implemented an 
underline of the line before a folded block, so it's now very clear where your code is folded. 
 
Cheers, Hamish.