prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.21k stars 715 forks source link

`operate-and-get-next` demo no longer works #1504

Open randy3k opened 2 years ago

randy3k commented 2 years ago

https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/prompts/operate-and-get-next.py

I remember that ctrl-o used to work in v2.0 but it no longer works in v3.0.

randy3k commented 2 years ago

I tracked down the issue. It is because set_working_index is run before the history is loaded so buff._working_lines is empty.