[issue42626] readline history, vi-editingmode and ANSI color codes bug
Joakim Nilsson added the comment: Sorry, my mistake. If you remove the last line "input()" from readline.py, it should be reproducible. Tested on Python 3.9.2. Link to video demonstration of the bug: http://nijoakim.com/readline-example.mp4. -- Added file: https://bugs.python.org/file50190/readline-example.py ___ Python tracker <https://bugs.python.org/issue42626> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42626] readline history, vi-editingmode and ANSI color codes bug
Joakim Nilsson added the comment: Yes, I have noticed that too, and I agree, not as bad as if it was garbled, but still an annoyance. On Fri, Jul 30, 2021 at 1:34 AM Andrei Kulakov wrote: > > Andrei Kulakov added the comment: > > Joakim: by the way, what I was able to reproduce is just a visual bug. > IOW, the text is still the same and all there in the buffer, but it shows > up only after a combination of rightward movement and 'a', and a copy of it > shows up on the left side. So it's not as serious as if the text was > garbled or impossible to enter or change. > > -- > > ___ > Python tracker > <https://bugs.python.org/issue42626> > ___ > -- ___ Python tracker <https://bugs.python.org/issue42626> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42626] readline history, vi-editingmode and ANSI color codes bug
New submission from Joakim Nilsson : Tested on Debian Bullseye with Python 3.9. If 'set editing-mode vi' is used in .inputrc and the attached program is run, a bug occurs when navigating the readline history. It seems only to occur when ANSI color escape characters are input to the 'input()' function. To reproduce the bug: Run 'readline-example.py' Enter '0123456789' in the prompt without quotes. Press enter. Press escape and then 'k' to go back in history in vi normal mode. The cursor is now placed between '2' and '3' and it is impossible to erase anything after the '2'. (To enter vi insert mode, press i and start editing the text normally.) This bug does not occur for shorter strings. If for example '012345678' is input, the program behaves normally. If the escape characters are not used in the 'input()' function, program behaves normally. -- components: Library (Lib) files: readline-example.py messages: 382917 nosy: nijoakim priority: normal severity: normal status: open title: readline history, vi-editingmode and ANSI color codes bug type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49673/readline-example.py ___ Python tracker <https://bugs.python.org/issue42626> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com