File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/repl-jline/scala/tools/nsc/interpreter/jline Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -94,19 +94,11 @@ private class JLineConsoleReader extends jconsole.ConsoleReader with interpreter
94
94
printColumns_(items : List [String ])
95
95
}
96
96
97
- // Workaround for JLine weirdness. (See https://github.com/scala/scala-dev/issues/240)
98
- // Emit control characters as-is, instead of representing them as e.g. "^J" (for '\n').
99
- // `rawPrint` is package protected in jline.console.ConsoleReader, while `rawPrintln` is private
100
- // Copy/paste part of it as `_rawPrint` (to avoid name clash);
101
- // the super class impl also sets `cursorOk`, but that's out of reach for us.
102
- private def _rawPrint (str : String ) = getOutput.write(str)
103
- private def rawPrintln (str : String ) = { _rawPrint(str); println() }
104
-
105
97
private def printColumns_ (items : List [String ]): Unit = if (items exists (_ != " " )) {
106
98
val grouped = tabulate(items)
107
99
var linesLeft = if (isPaginationEnabled()) height - 1 else Int .MaxValue
108
100
grouped foreach { xs =>
109
- rawPrintln (xs.mkString)
101
+ println (xs.mkString)
110
102
linesLeft -= 1
111
103
if (linesLeft <= 0 ) {
112
104
linesLeft = emulateMore()
@@ -117,7 +109,7 @@ private class JLineConsoleReader extends jconsole.ConsoleReader with interpreter
117
109
}
118
110
119
111
def readOneKey (prompt : String ) = {
120
- _rawPrint (prompt)
112
+ this .print (prompt)
121
113
this .flush()
122
114
this .readCharacter()
123
115
}
You can’t perform that action at this time.
0 commit comments