Python indent mode doesn't unindent pass correctly with tabs

Bug #71270 reported by Noah Medling
6
Affects Status Importance Assigned to Milestone
KDE Base
Invalid
Medium
kdebase (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: kate

I am using Kubuntu 6.10 amd64 with KDE 3.5.5 and Kate 2.5.5 (package version 3.5.5-0ubuntu3). When using Python indentation and tabs, Kate doesn't unindent the "pass" statement correctly.

1. Create a new document (File -> New). This must be done first, as Kate does not automatically apply indentation settings to new files. I will file a separate bug report for this shortly.

2. Go to Settings -> Configure Kate -> Editor -> Indentation and configure things as follows:

    Automatic Indentation:
        Indentation mode: Python Style (may be overridden by filetype)
    Indentation with Spaces:
        Use spaces instead of tabs to indent: Off (unchecked)

3. Type the following (note that the words in <angled brackets> are keys you should press, and should not be typed verbatim):

    class asdf: <return>
    pass <return>

After pressing <return> the first time, a tab is inserted at the beginning of the next line. After the second time pressing <return> (after "pass"), the correct behavior would be to remove the tab and leave the following line unindented. Instead, Kate indents the next line with a single space. I have tried this more tabs and it converted each tab into a space on the following line, but I have been unable to reliably reproduce the effect with multiple tabs.

Revision history for this message
Yuriy Kozlov (yuriy-kozlov) wrote :

Thank you for filing this bug. I can confirm this on current Kubuntu Feisty.

Changed in kdebase:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in kdebase:
status: Unknown → Unconfirmed
Revision history for this message
Paul Worrall (nicknak) wrote :

I can reproduce this bug in Hardy (kate 2.5.9) but not in KDE4.1 Intrepid, so marking as fixed.

Changed in kdebase:
status: Confirmed → Fix Released
Changed in kdebase:
status: New → Invalid
Changed in kdebase:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.