You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this issue both on MacOS and Ubuntu. I used different terminals, verified with Kitty and Alacritty.
Minimal Reproducible Example
importprompt_toolkitdefdemo():
session=prompt_toolkit.PromptSession(multiline=True)
print("Enter your text (type 'exit' to quit):")
whileTrue:
try:
user_input=session.prompt('> ')
ifuser_input.strip().lower() =='exit':
print("Exiting...")
breakprint(f"You entered:\n{user_input}")
except (EOFError, KeyboardInterrupt):
print("Exiting...")
breakif__name__=="__main__":
demo()
Description
I am developing HermesCLI, which is a chat app, and I use prompt_toolkit to handle multiline input. This issue frustrates the users as their history now gets lots of noise. When the terminal is resized, the prompt and the current input are printed repeatedly, cluttering the interface.
Steps to Reproduce
Run the provided minimal example.
Resize the terminal window.
Observe the repeated printing of the prompt and current input.
Expected Behavior
The prompt and current input should not be printed again when the terminal is resized.
Environment
Operating System: MacOS and Ubuntu
Terminals: Kitty and Alacritty
prompt_toolkit version: prompt_toolkit==3.0.47
Additional Information
❯ python demo.py
Enter your text (type 'exit' to quit):
> hello
> hello
> hello
> hello
The text was updated successfully, but these errors were encountered:
I encountered this issue both on MacOS and Ubuntu. I used different terminals, verified with Kitty and Alacritty.
Minimal Reproducible Example
Description
I am developing HermesCLI, which is a chat app, and I use prompt_toolkit to handle multiline input. This issue frustrates the users as their history now gets lots of noise. When the terminal is resized, the prompt and the current input are printed repeatedly, cluttering the interface.
Steps to Reproduce
Expected Behavior
The prompt and current input should not be printed again when the terminal is resized.
Environment
Additional Information
The text was updated successfully, but these errors were encountered: