Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Home button bug in ipdb on Linux

Running a file consisting of the line

import ipdb;ipdb.set_trace()

then entering more than 19 or more arbitrary characters in the command line and then hitting Home button (or Ctrl-A) makes the cursor go to position 11 instead of position 0 of the line and the line is garbaged as a result (it doesn't let me to the left of the 11th position in the line):

$ python ~test/c.py 
--Return--
None
> /home/test/c.py(2)<module>()
      1 import ipdb
----> 2 ipdb.set_trace()

ipdb> 1234567890123456789

Now pressing <Home> and then '_':

ipdb> 12345678901_1234567890123456789

while I expected it to be

ipdb> _1234567890123456789

Fresh install of Ubuntu and fresh install of Archlinux, python 2.7.10, 3.4.3+ are both affected. No libs except for ipdb 0.7, 0.8 or 0.9 (+dependencies) are installed.

Everything is ok in ipython or python command lines.

Tested in terminal, terminator and text terminal (ctrl-alt-f1), using bash and zsh.

Any idea why?

like image 616
Antony Hatchkins Avatar asked Mar 03 '26 14:03

Antony Hatchkins


1 Answers

Downgrading ipython to 4.0.0 solves the same problem for me. Credit discussion at https://github.com/gotcha/ipdb/issues/87 (circular reference here)

like image 63
LmW. Avatar answered Mar 06 '26 03:03

LmW.