LineReader

ammonite.terminal.LineReader
See theLineReader companion object
class LineReader(width: Int, prompt: Prompt, reader: Reader, writer: Writer, filters: Filter, displayTransform: (Vector[Char], Int) => (Str, Int))

Encapsulates the common configuration and logic around reading a single line of input

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def computeRendered(lastState: TermState): (Int, Str)
final def readChar(lastState: TermState, ups: Int, fullPrompt: Boolean): Option[String]
def redrawLine(buffer: Str, cursor: Int, ups: Int, rowLengths: IndexedSeq[Int], fullPrompt: Boolean, newlinePrompt: Boolean): Unit

Erases the previous line and re-draws it with the new buffer and cursor.

Erases the previous line and re-draws it with the new buffer and cursor.

Relies on ups to know how "tall" the previous line was, to go up and erase that many rows in the console. Performs a lot of horrific math all over the place, incredibly prone to off-by-ones, in order to at the end of the day position the cursor in the right spot.

Attributes

Concrete fields

lazy val ansi: AnsiNav