Bug 351190

Summary: Pressing enter with a line that starts with the variable name "returnValue" looses indentation in python
Product: [Applications] kate Reporter: Guy Sheffer <guysoft>
Component: kwriteAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Guy Sheffer 2015-08-11 14:00:33 UTC
Here is an example code in python:

def foo():
    returnValue = 0
    return returnValue

When typing it and reaching he line "returnValue = 0", then hitting enter, the cursor jumps to align with the "def" and not to where "return returnValue" is located.

Reproducible: Always

Steps to Reproduce:
1. type:
def foo():
    returnValue = 0
2. Remain with the cursor on the last line and press "enter"
3.

Actual Results:  
Your cursor will jump as if you wrote a "return" and exit the indented block

Expected Results:  
The cursor should stay in the indentation block
Comment 1 Christoph Cullmann 2015-08-11 19:51:26 UTC
Git commit 87863d6e877761775fbf666f5ae6c9f399de93c7 by Christoph Cullmann.
Committed on 11/08/2015 at 19:51.
Pushed by cullmann into branch 'master'.

fix problem with wrong unindent for python
we need to match for word boundaries

M  +4    -5    src/script/data/indentation/python.js

http://commits.kde.org/ktexteditor/87863d6e877761775fbf666f5ae6c9f399de93c7