()
| 625 | } |
| 626 | |
| 627 | func (buffer *Buffer) GetVisibleLines() []Line { |
| 628 | lines := []Line{} |
| 629 | |
| 630 | for i := buffer.Height() - int(buffer.ViewHeight()); i < buffer.Height(); i++ { |
| 631 | y := i - int(buffer.scrollLinesFromBottom) |
| 632 | if y >= 0 && y < len(buffer.lines) { |
| 633 | lines = append(lines, buffer.lines[y]) |
| 634 | } |
| 635 | } |
| 636 | return lines |
| 637 | } |
| 638 | |
| 639 | // tested to here |
| 640 |