MCPcopy
hub / github.com/liamg/darktile / carriageReturn

Method carriageReturn

internal/app/darktile/termutil/buffer.go:500–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

498}
499
500func (buffer *Buffer) carriageReturn() {
501
502 cursorVY := buffer.convertRawLineToViewLine(buffer.cursorPosition.Line)
503
504 for {
505 line := buffer.getCurrentLine()
506 if line == nil {
507 break
508 }
509 if line.wrapped && cursorVY > 0 {
510 buffer.cursorPosition.Line--
511 } else {
512 break
513 }
514 }
515
516 buffer.cursorPosition.Col = 0
517}
518
519func (buffer *Buffer) tab() {
520

Callers 15

TestNewLineFunction · 0.80
TestTabbingFunction · 0.80
TestOffsetsFunction · 0.80
TestVisibleLinesFunction · 0.80
TestClearWithoutFullViewFunction · 0.80
TestClearWithFullViewFunction · 0.80
TestCarriageReturnFunction · 0.80
TestGetCellFunction · 0.80

Calls 2

getCurrentLineMethod · 0.95

Tested by 15

TestNewLineFunction · 0.64
TestTabbingFunction · 0.64
TestOffsetsFunction · 0.64
TestVisibleLinesFunction · 0.64
TestClearWithoutFullViewFunction · 0.64
TestClearWithFullViewFunction · 0.64
TestCarriageReturnFunction · 0.64
TestGetCellFunction · 0.64