()
| 498 | } |
| 499 | |
| 500 | func (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 | |
| 519 | func (buffer *Buffer) tab() { |
| 520 |