Bug 351496 - Python folding is not working during initial typing
Summary: Python folding is not working during initial typing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: folding (other bugs)
Version First Reported In: 16.04.1
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-19 20:03 UTC by kevincmann
Modified: 2016-09-05 18:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kevincmann 2015-08-19 20:03:07 UTC
As I am typing a function or class in a python file, the code folding will activate with the open parenthesis but then deactivate with the close parenthesis and not reactivate until I go back and make a change (add a line then remove a line).

Here's an example. Typing:

def method(

the folding activates with the open paren. Continuing:

def method(arg)

the folding deactivates with the closing paren. Continuing:

def method(arg):
    pass

The folding stays inactive.

Adding a line in the immediate vicinity of the function (the line with "def" or one line above) activates code folding. Pressing undo afterward doesn't undo the activation of the code folding.


Reproducible: Always

Steps to Reproduce:
1. Open a python file.
2. Ensure the correct highlighting mode is active.
3. Create a function or class definition. Notice the folding becomes active with the opening paren and then deactivates with the closing paren.

Actual Results:  
No code folding

Expected Results:  
Code folding
Comment 1 Buovjaga 2016-06-25 15:21:50 UTC
Confirmed.

Arch Linux 64-bit
Kate 16.04.2
KDE Frameworks 5.23.0
Qt 5.7
xcb wm
Comment 2 Christoph Cullmann 2016-09-05 18:58:50 UTC
Git commit fad53be07a3c4c09965ff7d662b501e300ee7f31 by Christoph Cullmann.
Committed on 05/09/2016 at 18:57.
Pushed by cullmann into branch 'master'.

Bug 351496 - Python folding is not working during initial typing

look one line up, if we have indentation based folding
otherwise we miss if we type things like

def test()
    lalalal

that lalala... will lead to new folding start in def test() line

M  +9    -1    src/document/katebuffer.cpp

http://commits.kde.org/ktexteditor/fad53be07a3c4c09965ff7d662b501e300ee7f31