When you're in a multi code block it should simply never send on (shift+)enter then. Close the code block first.