From e618606b4d7c844b060d574e1ea416cd68ca48e9 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 13 Jan 2017 08:10:37 +0100 Subject: [PATCH] Fix possible sublist exception --- reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java b/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java index 6fae29135..bbaaacd4b 100644 --- a/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java +++ b/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java @@ -4021,7 +4021,7 @@ private void update() { PostResult pr = computePost(possible, completion(), null, completed); AttributedString text = insertSecondaryPrompts(AttributedStringBuilder.append(prompt, buf.toString()), new ArrayList<>()); int promptLines = text.columnSplitLength(size.getColumns(), false, display.delayLineWrap()).size(); - if (pr.lines >= size.getRows() - promptLines) { + if (pr.lines > size.getRows() - promptLines) { int displayed = size.getRows() - promptLines - 1; if (pr.selectedLine >= 0) { if (pr.selectedLine < topLine) {