fix issues with home/end in bpython