Added GetScrollOffset() to TextView. Resolves #124

This commit is contained in:
Oliver 2018-07-28 21:30:50 +02:00
parent 405e5fbb4f
commit 6614b16d90
1 changed files with 6 additions and 0 deletions

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