After running a bash script, my (gnome-)terminal ended up printing each new line where the last one ended (but on the next row). I think it was printf that broke things, since it works if I replace printf with echo. Have you any idea what this could be, and how to fix it without having to close the terminal session?
I can not provide the script, because of security reasons. When I have time I will see if I can create a minimal broken example to show.

stty sane^J(^J meaning ctrl-j) at the command line. – Deathgrip Jan 18 '18 at 07:22resetworks, but then I lose history. I thought it started a whole new session, tbh. – lindhe Jan 18 '18 at 08:36resetdoes anything other than print some control codes to reset the terminal, it shouldn't affect the shell's history. It does clear the screen, though, but with garbage like that on-screen, that shouldn't matter. – ilkkachu Jan 18 '18 at 09:45