#106 Shift-Del insert extra 0x7f character in edit buffer

closed
nobody
None
5
2007-04-11
2006-01-29
Cédric Delfosse
No

DrPython version 161
WxPython version 2.6.1.2
OS: Linux

Hello,

looks like there's a bug with the key event handler
when editing files. If you press Shift-Del to erase
some characters, an extra 0x7f character is inserted
into the edit buffer.

Here's how to reproduce the problem:

1/ launch drpython myfile.py
1 bis/ select beginner
1 ter/ accept to create file
2/ save the empty file
3/ add the three lines composed of a \n b \n c \n
4/ save (the file is ok)
5/ Select a full firest line by keyboard ( [begin line
key] [shift press]
[arrow down key]
6/ Delete [delete key] [shift release]
7/ save
8/ check that the file is corrupted (launch od -c on
the file; the 177
octal value appear).

See also:
- http://bugs.debian.org/347622
- http://bugs.debian.org/347623

Regards,

Discussion

  • Logged In: YES
    user_id=772872

    Assign the Shift-del Key to Delete
    or if you need the del key also to delete:

    You could try to apply a patch:
    drShortcuts.py

    at the end of the function SetSTCShortcuts:

    stc.CmdKeyAssign(wx.stc.STC_KEY_DELETE,
    wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_CLEAR)

    Better would be to make a script and assign it to
    Shift-del key.

    DrDocument.CmdKeyExecute(wx.stc.STC_CMD_CLEAR)

     
    • status: open --> closed