Bug 323966

Summary: Python indenter issue when returning function result
Product: [Applications] kate Reporter: Gerald Senarclens de Grancy <oss>
Component: indentationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.1
Sentry Crash Report:

Description Gerald Senarclens de Grancy 2013-08-24 11:25:55 UTC
When returning the result of a function w/ arguments over more than one line, the indentation is incorrect.

reproduce:
- enter the following text
"""
def some_function():
    return other(arg1,
"""
- type [enter]

expected:
the cursor should be aligned with the opening parenthesis

actual:
the cursor is moved to the leftmost column

Reproducible: Always
Comment 1 Gerald Senarclens de Grancy 2013-08-24 11:35:39 UTC
Git commit 140320c71af3a744383eb197b47545b2c48a51cd by Gerald Senarclens de Grancy.
Committed on 24/08/2013 at 11:27.
Pushed by geralds into branch 'master'.

fixed issue in Python indenter (static unindent on return)

added new tests for the fix; all tests now pass

M  +28   -20   part/script/data/indentation/python.js
A  +4    -0    tests/data/indent/python/dedentReturn2/expected
A  +5    -0    tests/data/indent/python/dedentReturn2/input.js
A  +2    -0    tests/data/indent/python/dedentReturn2/origin
A  +6    -0    tests/data/indent/python/dedentReturn3/expected
A  +7    -0    tests/data/indent/python/dedentReturn3/input.js
A  +3    -0    tests/data/indent/python/dedentReturn3/origin

http://commits.kde.org/kate/140320c71af3a744383eb197b47545b2c48a51cd
Comment 2 Gerald Senarclens de Grancy 2013-08-24 11:51:13 UTC
Git commit 8a7ca2f4059c242895d40190ff07d9a65d66602c by Gerald Senarclens de Grancy.
Committed on 24/08/2013 at 11:27.
Pushed by geralds into branch 'KDE/4.11'.

fixed issue in Python indenter (static unindent on return)

added new tests for the fix; all tests now pass

M  +28   -20   part/script/data/indentation/python.js
A  +4    -0    tests/data/indent/python/dedentReturn2/expected
A  +5    -0    tests/data/indent/python/dedentReturn2/input.js
A  +2    -0    tests/data/indent/python/dedentReturn2/origin
A  +6    -0    tests/data/indent/python/dedentReturn3/expected
A  +7    -0    tests/data/indent/python/dedentReturn3/input.js
A  +3    -0    tests/data/indent/python/dedentReturn3/origin

http://commits.kde.org/kate/8a7ca2f4059c242895d40190ff07d9a65d66602c