For windows change the terminal shell path (File->Settings->Tools->Terminal) from cmd.exe
to:
cmd.exe "/K mode con:cols=500 lines=9999&cmd.exe"
as described in the bug description (https://youtrack.jetbrains.com/issue/IDEA-117552)
Edit: wrap /K in quotes as well!