Open danielhollas opened 4 months ago
@lysnikolaou I've taken the liberty of creating the issue for your observation in #118877, I hope that is okay.
I believe I have a fix for this in #118939, in case you want to take a look. Thanks!
@cfbolz thanks for confirming the issue! It would be great if you could test if #118939 solves the problem for you.
Pressing the Left arrow after the completions are shown moves the cursor three positions to the left.
It turns out
reader.pos2xy
usesreader.screen
andreader.screeninfo
to compute the position in the screen. Both of these include the two lines with completions. However,reader.pos
andreader.buffer
only include the things actually typed by the user (i.e. the third linedatetime.
). This leads to the new cursor position calculation being faulty. We'll have to think more about how to fix this.Originally posted by @lysnikolaou in https://github.com/python/cpython/issues/118877#issuecomment-2104840020