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.37k stars 716 forks source link

Single enter adds 2 lines in console when debugging with PyCharm #782

Open ixje opened 6 years ago

ixje commented 6 years ago

We've used prompt_toolkit since the 1.x version but since upgrading to 2.x we run into trouble when debugging using PyCharm on OSX. Each 'enter' in the console is executed twice.

We did not have this problem when using the 1.x version and strange enough it also doesn't happen when using a regular terminal (e.g. iTerm on OSX). My dev environment didn't change, all we did was updating to 2.x so this makes me believe the issue is likely with the new version. I tried 2.0.1, 2.0.5 and just now 2.0.7. For what it's worth; I use the "emulate terminal in output console" option in PyCharm.

Any pointers/ideas how to fix would be appreciated. If there is any way to provide additional information, please let me know.

arlyon commented 4 years ago

Still having this error in pycharm 2018.3 and latest prompt-toolkit (3.0.2), though it happens during regular runs too.