Bug 344414 - Codefolding for only one level in Kate (more a wish than a bug)
Summary: Codefolding for only one level in Kate (more a wish than a bug)
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: unspecified
Platform: Mageia RPMs Other
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 344551 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-20 23:50 UTC by Martin Schmitz
Modified: 2019-04-20 11:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schmitz 2015-02-20 23:50:41 UTC
I asked Christoph (Cullmann) for the following option, because kate crashed on codefolding and doen't restore folding after crash. He wrote me to try it here.

I would beg you to implement codefolding for one level (see example):

class my_class{
  function my_func_1(){
    ...
  }
  function my_func_2(){
    ...
  }
  function my_func_3(){
    ...
  }
}

...should become...

class my_class{
  function my_func_1(){
  function my_func_2(){
  function my_func_3(){
}

Best, if:
> Mouse left: - fold current level (as it is now)
> Mouse middle: -fold current level (as described above)
> Mouse right: - fold current and all sublevels

currently text-buffer is inserted, on middle mouseclick (even that curser is not in the textarea)

This would make Kate much more comfortable :-)


Reproducible: Always




It's a wish, not a bug (sorry)
Comment 1 Dominik Haumann 2016-06-13 12:28:25 UTC
*** Bug 344551 has been marked as a duplicate of this bug. ***
Comment 2 Lothar 2019-04-20 11:27:17 UTC
Git commit 5c83e29561e3425fb1f917a2c8de31eb48a5cd8d by loh tar.
Committed on 20/04/2019 at 11:24.
Pushed by lohtar into branch 'master'.

Add action to toggle folding of child ranges

Summary:

With this patch will all, and only, the nested foldings of a range
(un)folded by right mouse click on the left hand icon border.

The range itself kept untouched, not toggled.

However, for convenience toggle the right button also a range which
doesn't contain other folding ranges.

- Described action is also available in "View->Code Folding" menu as
  "Toggle Contained Nodes"
- Old two actions "Fold/Unfold Current Node" are replaced by
  "Toggle Current Node"

The noted bug report request a slightly different behavior, but I think
it's close enough to considered that as "fixed".
FIXED-IN: 5.58

Differential Revision: https://phabricator.kde.org/D20606

M  +3    -3    src/data/katepart5ui.rc
M  +3    -2    src/document/katebuffer.cpp
M  +2    -1    src/document/katebuffer.h
M  +97   -29   src/view/kateview.cpp
M  +25   -10   src/view/kateview.h
M  +6    -22   src/view/kateviewhelpers.cpp
M  +8    -0    src/view/kateviewinternal.cpp

https://commits.kde.org/ktexteditor/5c83e29561e3425fb1f917a2c8de31eb48a5cd8d