mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
nonempty check
This commit is contained in:
@@ -28,7 +28,8 @@ public class ConsoleHistoryModel implements ModificationTracker {
|
||||
myHistoryCursor = -1;
|
||||
|
||||
myHistory.remove(statement);
|
||||
if (myHistory.size() >= maxHistorySize) {
|
||||
int size = myHistory.size();
|
||||
if (size >= maxHistorySize && size > 0) {
|
||||
myHistory.removeLast();
|
||||
}
|
||||
myHistory.addFirst(statement);
|
||||
|
||||
Reference in New Issue
Block a user