Skip to content

Commit

Permalink
Add possibly missing newline in the full screen menu completion mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 3, 2017
1 parent 6d4122b commit 4e801d8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4157,7 +4157,12 @@ private void update() {
topLine = pr.selectedLine - displayed + 1;
}
}
List<AttributedString> lines = pr.post.columnSplitLength(size.getColumns(), true, display.delayLineWrap());
AttributedString post = pr.post;
if (post.length() > 0 && post.charAt(post.length() - 1) != '\n') {
post = new AttributedStringBuilder(post.length() + 1)
.append(post).append("\n").toAttributedString();
}
List<AttributedString> lines = post.columnSplitLength(size.getColumns(), true, display.delayLineWrap());
List<AttributedString> sub = new ArrayList<>(lines.subList(topLine, topLine + displayed));
sub.add(new AttributedStringBuilder()
.style(AttributedStyle.DEFAULT.foreground(AttributedStyle.CYAN))
Expand Down

0 comments on commit 4e801d8

Please sign in to comment.