summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-13 15:26:15 +0000
committerPaul Phillips <paulp@improving.org>2010-12-13 15:26:15 +0000
commitbeed1ea8114ea05ebf615bdffae9ac8659f7a396 (patch)
treeba3f7516fbd005383182f05ab58fc4953ab5609b /src
parentf033bc401a524cd14a49730df74a62ab9acbf586 (diff)
downloadscala-beed1ea8114ea05ebf615bdffae9ac8659f7a396.tar.gz
scala-beed1ea8114ea05ebf615bdffae9ac8659f7a396.tar.bz2
scala-beed1ea8114ea05ebf615bdffae9ac8659f7a396.zip
More repl hardening, and a new jline jar which ...
More repl hardening, and a new jline jar which fixes a paste issue on OSX. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala12
-rw-r--r--src/jline/src/main/java/jline/console/ConsoleReader.java6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index f9eddd2eda..44dd0698d1 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -122,11 +122,19 @@ class Interpreter(val settings: Settings, out: PrintWriter) {
true
}
catch {
- case MissingRequirementError(msg) => println("""
+ case x: AbstractMethodError =>
+ println("""
+ |Failed to initialize compiler: abstract method error.
+ |This is most often remedied by a full clean and recompile.
+ |""".stripMargin
+ )
+ x.printStackTrace()
+ false
+ case x: MissingRequirementError => println("""
|Failed to initialize compiler: %s not found.
|** Note that as of 2.8 scala does not assume use of the java classpath.
|** For the old behavior pass -usejavacp to scala, or if using a Settings
- |** object programatically, settings.usejavacp.value = true.""".stripMargin.format(msg)
+ |** object programatically, settings.usejavacp.value = true.""".stripMargin.format(x.req)
)
false
}
diff --git a/src/jline/src/main/java/jline/console/ConsoleReader.java b/src/jline/src/main/java/jline/console/ConsoleReader.java
index fe9e85aed9..44b0cbf866 100644
--- a/src/jline/src/main/java/jline/console/ConsoleReader.java
+++ b/src/jline/src/main/java/jline/console/ConsoleReader.java
@@ -513,7 +513,11 @@ public class ConsoleReader
* fixes backspace issue, where it assumes that the terminal is doing this.
*/
private final void newlineAtWrap() throws IOException {
- if (terminal.newlineAtWrapNeeded()) {
+ /** On OSX this leads to failure to paste lines longer than the
+ * the terminal width. It spews some ansi control and truncates
+ * the paste.
+ */
+ if (false && terminal.newlineAtWrapNeeded()) {
int width = getTerminal().getWidth();
if ((getCursorPosition() % width == 0) && getCurrentPosition() >= width)