Isn't completely clear if this is a prompt issue or not, but here's the repro:
Fire up command prompt, ensure it's using the new conhost (Use legacy console not selected).
Insert a bunch of stuff into the scroll buffer and ensure window scrolls a bit down before continuing
Using the toolkit API, prompt for input with a completer attached
Specify input
Note line state starts to get Wonky(tm) after a few inputs (1 or more). May need to repeat steps 2-4 a few more times.
Animated gif showing me simplying typing A-E, hitting enter between each letter.
And the sample code
from prompt_toolkit import prompt
from prompt_toolkit.contrib.completers import WordCompleter
import sys
for i in range(50):
print('--Scroll buffer filler--');
print('--End of scroll buffer filler--');
for i in range(5):
html_completer = WordCompleter(['<html>', '<body>', '<head>', '<title>'])
text = prompt('Prompt #%i: ' % i, completer = html_completer)
print('Answer #%i: %s' % (i, text))
Thank you @riverar. The sample code is very helpful!
I'll try to reproduce/debug/fix asap.
(Sometimes, the windows console is tricky to get right, but we'll manage it.)
Isn't completely clear if this is a prompt issue or not, but here's the repro:
Animated gif showing me simplying typing A-E, hitting enter between each letter.
And the sample code