Skip to content

Commit

Permalink
Fail to scroll candidate list, fixes #475
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Nov 19, 2019
1 parent 733b3e1 commit 4c73a52
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -4831,8 +4831,10 @@ 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) {
int displayed = size.getRows() - promptLines - 1;
Status status = Status.getStatus(terminal, false);
int displaySize = size.getRows() - (status != null ? status.size() : 0) - promptLines;
if (pr.lines > displaySize) {
int displayed = displaySize - 1;
if (pr.selectedLine >= 0) {
if (pr.selectedLine < topLine) {
topLine = pr.selectedLine;
Expand Down

0 comments on commit 4c73a52

Please sign in to comment.