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:
parent
405e5fbb4f
commit
6614b16d90
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user