I decided to edit my answer because one of my rereaders pointed out you might not be part of the scala development team
If indeed I’m using Ubuntu with Gnome and Gnome Terminal. The behavior I describe also happens with bash in a mere virtual console as well as a vanilla xterm.
The behavior of ^C under Linux normal circumstances is to trigger signal SIGINT which is meant to interrupt (well humanly speaking cancel) running programs under Linux (and all Unices since 1970).
Wiki quote from Signal (IPC) - Wikipedia
The SIGINT signal is sent to a process by its controlling terminal when a user wishes to interrupt the process. This is typically initiated by pressing Ctrl+C, but on some systems, the “delete” character or “break” key can be used.
Your solution is to disable ^C altogether and remap it to something, solution that will only work in a terminal that allow such remapping.
If every time someone develops something for Linux or any other OS for that matter, something that has a behavior that is somehow cumbersome and asks their users to alter a common and very established functionality of the system it’s running on, here ^C, I think that the system will get messed up.
No, ^C is not a behavior specific to Gnome Terminal, it’s rather a very general Unix behavior.
Also no, this is not the fault of Gnome Terminal.
However, that a shell or program that behaves like a shell fails to handle SIGINT to provide a custom behavior more useful than ending up with the process killed, that is unusual. I’ve written such interpreters myself and this is really something I treat in the early stages of development so that I don’t kill my process every time I only wish to cancel current action within the interpreter, rather than cancelling the whole interpreter if you see my point. It’s common to emulate (is it?) the ^C behavior within a shell. Yes, is it? Indeed, bash for instance and ALL other shells do exactly that, otherwise they would get killed by the kernel as SIGINT’s default behavior is to do so.
As you might not be part of the scala dev team, I was merely asking them to consider installing a SIGINT handler (doc is here sigaction(2) - Linux manual page) as it’s common and even best practice in such a situation. Maybe I asked this question in the wrong place. My bad in that case.
Thanks in advance for considering this. With my best regards.