mirror of https://github.com/sbt/sbt.git
remove call-by-name modifier for error function, doesn't work well
This commit is contained in:
parent
fbb8db8132
commit
9c8cf4451d
|
|
@ -6,7 +6,7 @@ package complete
|
||||||
|
|
||||||
import History.number
|
import History.number
|
||||||
|
|
||||||
final class History private(lines: IndexedSeq[String], error: (=> String) => Unit) extends NotNull
|
final class History private(lines: IndexedSeq[String], error: String => Unit) extends NotNull
|
||||||
{
|
{
|
||||||
private def reversed = lines.reverse
|
private def reversed = lines.reverse
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ final class History private(lines: IndexedSeq[String], error: (=> String) => Uni
|
||||||
|
|
||||||
object History
|
object History
|
||||||
{
|
{
|
||||||
def apply(lines: Seq[String], error: (=> String) => Unit): History = new History(lines.toIndexedSeq, error)
|
def apply(lines: Seq[String], error: String => Unit): History = new History(lines.toIndexedSeq, error)
|
||||||
|
|
||||||
def number(s: String): Option[Int] =
|
def number(s: String): Option[Int] =
|
||||||
try { Some(s.toInt) }
|
try { Some(s.toInt) }
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ object HistoryCommands
|
||||||
def printHelp(): Unit =
|
def printHelp(): Unit =
|
||||||
println(helpString)
|
println(helpString)
|
||||||
|
|
||||||
def apply(s: String, historyPath: Option[Path], maxLines: Int, error: (=> String) => Unit): Option[List[String]] =
|
def apply(s: String, historyPath: Option[Path], maxLines: Int, error: String => Unit): Option[List[String]] =
|
||||||
if(s.isEmpty)
|
if(s.isEmpty)
|
||||||
{
|
{
|
||||||
printHelp()
|
printHelp()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue