Improve indentation of next line when using CTRL-o in terminal.
Improve indentation of next line when using CTRL-o in terminal.

Closes #9588

Similar to #10264, but with a simpler logic as we never execute.

ipython/ipython,ipython/ipython