Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
2018-10-15 12:01:10 -04:00
parent 31ad72567a
commit d7ecd75678
9 changed files with 40 additions and 35 deletions

View File

@@ -132,8 +132,10 @@ public final class HistoryTextKeyListener extends KeyAdapter {
// Lower arrow retrieves next commands
if (keyCode == SWT.ARROW_DOWN) {
if (currentIndex <= 0) {
currentIndex=-1;
console.setInput(EMPTY);
if (currentIndex == 0) {
console.setInput(EMPTY);
}
currentIndex = -1;
} else {
final String cmd = commands.get(commands.size() - (--currentIndex) - 1);
console.setInput(cmd);