Fixed rename/refactor undo pushing the newest state, not the previous one

This commit is contained in:
bigguy345 committed 2025-12-21 12:54:52 +02:00
1 parent 49b8c2ef98
commit f1d21496bd
2 files changed
+10 -7

No files matched your search

@@ -351,10 +351,10 @@ public class GuiScriptTextArea extends GuiNpcTextField {
}
@Override
public void pushUndoState(String textState) {
public void pushUndoState(String textState, int cursor) {
// Push a specific text state to the undo list
if (!undoing) {
undoList.add(new UndoData(textState, selection.getCursorPosition()));
undoList.add(new UndoData(textState, cursor));
redoList.clear();
}
}