Bug 351190 - Pressing enter with a line that starts with the variable name "returnValue" looses indentation in python
Summary: Pressing enter with a line that starts with the variable name "returnValue" l...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: 5.0.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 14:00 UTC by Guy Sheffer
Modified: 2015-08-11 19:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

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