mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-24 19:46:34 +01:00
*Fix history limit
This commit is contained in:
parent
a521cb9ac3
commit
ff59a61046
@ -212,7 +212,6 @@ public class LocalSession {
|
||||
if (editSession.size() == 0 || editSession.hasFastMode()) {
|
||||
return;
|
||||
}
|
||||
System.out.println("SIZE: " + historySize + " | " + history.size());
|
||||
// Destroy any sessions after this undo point
|
||||
if (append) {
|
||||
while (historyPointer < history.size()) {
|
||||
@ -229,7 +228,7 @@ public class LocalSession {
|
||||
history.add(0, editSession);
|
||||
historyPointer++;
|
||||
}
|
||||
while ((history.size() > MAX_HISTORY_SIZE || historySize > limitMb) && history.size() > 0) {
|
||||
while ((history.size() > MAX_HISTORY_SIZE || historySize < limitMb) && history.size() > 1) {
|
||||
EditSession item = history.get(0);
|
||||
historySize -= MainUtil.getSizeInMemory(item.getChangeSet());
|
||||
history.remove(0);
|
||||
|
Loading…
Reference in New Issue
Block a user