mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Better check whether history is not empty
This commit is contained in:
+6
-2
@@ -235,7 +235,9 @@ public abstract class AbstractConsoleRunnerWithHistory {
|
||||
if (lineNumber > 0){
|
||||
caretModel.moveCaretRelatively(0, -1, false, consoleEditor.getSelectionModel().hasBlockSelection(), true);
|
||||
} else {
|
||||
historyProcessor.process(e, myHistory.getHistoryPrev());
|
||||
if (myHistory.hasHistory(false)) {
|
||||
historyProcessor.process(e, myHistory.getHistoryPrev());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -246,7 +248,9 @@ public abstract class AbstractConsoleRunnerWithHistory {
|
||||
if (lineNumber < document.getLineCount() - 1){
|
||||
caretModel.moveCaretRelatively(0, 1, false, consoleEditor.getSelectionModel().hasBlockSelection(), true);
|
||||
} else {
|
||||
historyProcessor.process(e, myHistory.getHistoryNext());
|
||||
if (myHistory.hasHistory(true)) {
|
||||
historyProcessor.process(e, myHistory.getHistoryNext());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user