diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-06-17 14:47:13 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-06-19 08:10:25 -0700 |
commit | c3aca109e95e2259d9909f8457a1422c5c995940 (patch) | |
tree | 733e9869a7a3c064ab667a564fb7e63745b6e390 /src/compiler/scala/tools/nsc/Properties.scala | |
parent | aa98d9a8c19ca27d85b62d1eccfc868440dc9ab2 (diff) | |
download | scala-c3aca109e95e2259d9909f8457a1422c5c995940.tar.gz scala-c3aca109e95e2259d9909f8457a1422c5c995940.tar.bz2 scala-c3aca109e95e2259d9909f8457a1422c5c995940.zip |
SI-9206 Fix REPL code indentation
To make code in error messages line up with the original line of
code, templated code is indented by the width of the prompt.
Use the raw prompt (without ANSI escapes or newlines) to determine
the indentation.
Also, indent only once per line.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Properties.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Properties.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Properties.scala b/src/compiler/scala/tools/nsc/Properties.scala index 9f160e2485..ca7d8776d4 100644 --- a/src/compiler/scala/tools/nsc/Properties.scala +++ b/src/compiler/scala/tools/nsc/Properties.scala @@ -13,7 +13,7 @@ object Properties extends scala.util.PropertiesTrait { // settings based on jar properties, falling back to System prefixed by "scala." def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ") - def shellPromptString = scalaPropOrElse("shell.prompt", "\nscala> ") + def shellPromptString = scalaPropOrElse("shell.prompt", "%nscala> ") // message to display at EOF (which by default ends with // a newline so as not to break the user's terminal) def shellInterruptedString = scalaPropOrElse("shell.interrupted", f":quit$lineSeparator") |