1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-24 13:48:56 +08:00

Added GetScrollOffset() to TextView. Resolves #124

This commit is contained in:
Oliver 2018-07-28 21:30:50 +02:00
parent 405e5fbb4f
commit 6614b16d90

View File

@ -310,6 +310,12 @@ func (t *TextView) ScrollToEnd() *TextView {
return t
}
// GetScrollOffset returns the number of rows and columns that are skipped at
// the top left corner when the text view has been scrolled.
func (t *TextView) GetScrollOffset() (row, column int) {
return t.lineOffset, t.columnOffset
}
// Clear removes all text from the buffer.
func (t *TextView) Clear() *TextView {
t.buffer = nil