LineReader

ammonite.terminal.LineReader$
See theLineReader companion class
object LineReader

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def calculateHeight(buffer: Vector[Char], width: Int, prompt: String): Seq[Int]
def calculateHeight0(rowLengths: IndexedSeq[Int], width: Int): IndexedSeq[Int]

Given a buffer with characters and newlines, calculates how high the buffer is and where the cursor goes inside of it.

Given a buffer with characters and newlines, calculates how high the buffer is and where the cursor goes inside of it.

Attributes

def fragHeight(length: Int, width: Int): Int

Computes how tall a line of text is when wrapped at width.

Computes how tall a line of text is when wrapped at width.

Even 0-character lines still take up one row!

width = 2 0 -> 1 1 -> 1 2 -> 1 3 -> 2 4 -> 2 5 -> 3

Attributes

def noTransform(x: Vector[Char], i: Int): (Str, Int)
def positionCursor(cursor: Int, rowLengths: IndexedSeq[Int], fragHeights: IndexedSeq[Int], width: Int): (Int, Int)
def splitBuffer(buffer: Vector[Char]): IndexedSeq[Int]