Evaluate Multiple Line Expression

If I select multiple lines then try to evaluate the expression (Alt-F8) all the lines are merged into one.
I can then click Code Fragment Mode but everything is still on one line.
I have to go back to the code and copy paste the block again.
If the Expression window was previously open in Code Fragment Mode then things are OK.
However, the majority of the time I use it in the Expression mode.

It certainly would be useful to me for IDEA to detect if multiple line are selected and choose the mode automatically.
A second less pleasing way would be to have another keyboard shortcut to open in Code Fragment Mode.

What do you think?

Please sign in to leave a comment.