rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.17k stars 574 forks source link

Closes #844 Fix TextArea's SetText by resetting nextUndo counter #857

Closed JoseRizzal closed 1 year ago

JoseRizzal commented 1 year ago

TextArea's method SetText() has wrong undo logic. Currently only undoStack has reset, which means, if SetText() called second time, nextUndo counter stays the same. If press Ctrl-Z right after second SetText() it trying to reach nextUndo position into empty undoStack and get panic

rivo commented 1 year ago

Thanks.