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
However, since it is just a guess, it is not reliable. When the app is slow responding and the user presses enter multiple times, these chars will be treated as a paste event.
To avoid this behavior, add this line after creating the app:
We should handle the paste event better. Since pasting multiline text into a single-line prompt doesn't really make sense, we can reject the paste event and re-feed those keys into input. On vt100, it should throw or replace \n with a space.
The app:
When
multiline=False
, pressing enter should triggeraccept_handler
.However, when pasting multi-line text to the console,
TextArea
draws a new line then scroll down. In this case,accept_handler
won't be triggered.Another way to trigger this bug is to type very fast when the computer is slow. I guess it works similarly as copy-pasting.
Windows 10
prompt_toolkit 3.0.47
cmd.exe + Windows Terminal
The text was updated successfully, but these errors were encountered: