mirror of https://github.com/rivo/tview.git
textarea -- fix nextUndo after SetText
This commit is contained in:
parent
8bd761dda8
commit
5f8630c515
|
@ -385,6 +385,7 @@ func (t *TextArea) SetText(text string, cursorAtTheEnd bool) *TextArea {
|
||||||
t.cursor.row, t.cursor.actualColumn, t.cursor.column = 0, 0, 0
|
t.cursor.row, t.cursor.actualColumn, t.cursor.column = 0, 0, 0
|
||||||
t.cursor.pos = [3]int{1, 0, -1}
|
t.cursor.pos = [3]int{1, 0, -1}
|
||||||
t.undoStack = t.undoStack[:0]
|
t.undoStack = t.undoStack[:0]
|
||||||
|
t.nextUndo = 0
|
||||||
|
|
||||||
if len(text) > 0 {
|
if len(text) > 0 {
|
||||||
t.spans = append(t.spans, textAreaSpan{
|
t.spans = append(t.spans, textAreaSpan{
|
||||||
|
|
Loading…
Reference in New Issue