mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Fixed rename/refactor undo pushing the newest state, not the previous one
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user