summaryrefslogtreecommitdiff
path: root/src/repl
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-12-03 16:38:55 -0800
committerSom Snytt <som.snytt@gmail.com>2013-12-03 16:56:18 -0800
commit30f779b4d9b699800e323eeba31cf04c16b4fbcd (patch)
tree128e704dd783731294062b76c832abb17c0c778d /src/repl
parent6c63ab153651f7946ece5740d52e0f2b701e349d (diff)
downloadscala-30f779b4d9b699800e323eeba31cf04c16b4fbcd.tar.gz
scala-30f779b4d9b699800e323eeba31cf04c16b4fbcd.tar.bz2
scala-30f779b4d9b699800e323eeba31cf04c16b4fbcd.zip
SI-8027 REPL double tab regression
Where did double tab go? "The shadow knows." The regression was introduced by the last flurry before we were left to wallow in whatever white space remained. Some xs put other xs under erasure. It's clear that somebody's daughter walked into the room and asked for a story, because, shockingly, the case arrows don't line up. We need a plug-in for Jenkins, or I guess Travis, to fail the build if arrows and equals don't align, because it clearly indicates a lapse of some kind.
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/scala/tools/nsc/interpreter/JLineCompletion.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/repl/scala/tools/nsc/interpreter/JLineCompletion.scala
index 1b3d60d41a..53c7c82e89 100644
--- a/src/repl/scala/tools/nsc/interpreter/JLineCompletion.scala
+++ b/src/repl/scala/tools/nsc/interpreter/JLineCompletion.scala
@@ -294,7 +294,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput
// This is jline's entry point for completion.
override def complete(buf: String, cursor: Int): Candidates = {
verbosity = if (isConsecutiveTabs(buf, cursor)) verbosity + 1 else 0
- repldbg("\ncomplete(%s, %d) last = (%s, %d), verbosity: %s".format(buf, cursor, lastBuf, lastCursor, verbosity))
+ repldbg(f"%ncomplete($buf, $cursor%d) last = ($lastBuf, $lastCursor%d), verbosity: $verbosity")
// we don't try lower priority completions unless higher ones return no results.
def tryCompletion(p: Parsed, completionFunction: Parsed => List[String]): Option[Candidates] = {
@@ -307,8 +307,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput
val advance = longestCommonPrefix(winners)
lastCursor = p.position + advance.length
lastBuf = (buf take p.position) + advance
- repldbg("tryCompletion(%s, _) lastBuf = %s, lastCursor = %s, p.position = %s".format(
- p, lastBuf, lastCursor, p.position))
+ repldbg(s"tryCompletion($p, _) lastBuf = $lastBuf, lastCursor = $lastCursor, p.position = ${p.position}")
p.position
}