Skip to content

Commit e9563d9

Browse files
committed
PrintAboveWriter fix the last new line test
1 parent 7c697eb commit e9563d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

reader/src/main/java/org/jline/reader/PrintAboveWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public PrintAboveWriter(LineReader reader) {
3434
public void flush() {
3535
StringBuffer buffer = getBuffer();
3636
int lastNewline = buffer.lastIndexOf("\n");
37-
if (lastNewline > 0) {
37+
if (lastNewline >= 0) {
3838
reader.printAbove(buffer.substring(0, lastNewline + 1));
3939
buffer.delete(0, lastNewline + 1);
4040
}

0 commit comments

Comments
 (0)