Bug 323966 - Python indenter issue when returning function result
Summary: Python indenter issue when returning function result
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: indentation (show other bugs)
Version: Git
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-24 11:25 UTC by Gerald Senarclens de Grancy
Modified: 2013-08-26 07:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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