Sometimes delete key deletes too much

Bug #1300270 reported by Luke Plant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Sometimes, when the cursor has whitespace following it, pressing delete causes the whitespace AND additional characters to be deleted.

It's difficult to create a fully minimal example, but I've managed to get it down to this, using python-mode 6.1.3

Create a file tmp.py containing the following:

{{{
x = {'abc':'def',

     'ghi':'jkl'}

}}}

(Note the leading 5 spaces on lines 2 and 3)

Open the file.

Place cursor to the end of the 2nd line (after 5 spaces).

Press delete 4 times.

Intermediate result:

{{{
x = {'abc':'def',
        'ghi':'jkl'}

}}}

Press delete one more time. Result:

{{{
x = {'abc':'def',
     ghi':'jkl'}
}}}

Which is not expected!

Revision history for this message
Luke Plant (spookylukey) wrote :

The '{{{' and '}}}' in my description were intended to be delimiters not actual part of the file.

Revision history for this message
Luke Plant (spookylukey) wrote :

Grr, spaces deleted as well. I'll just add an attachment for 'tmp.py'

Changed in python-mode:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.2.0
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Checked in a fix, please try again with current trunk.

Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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