-
Notifications
You must be signed in to change notification settings - Fork 238
Open
Description
used AI to summarize the issue :
Summary
When a terminal with a JLine3 Status bar is resized vertically, the old status bar content remains visible at the old position until the next user input (keystroke). This creates a visual artifact where multiple status bars appear to be present.
Expected Behavior
On vertical terminal resize, the Status bar should:
- Clear from its old position
- Immediately appear at the new bottom position
- No visual artifacts should remain
Actual Behavior
On vertical terminal resize:
- New status bar appears at the correct new position
- Old status bar content remains visible at the old position
- Old status bar only disappears when user presses a key or types
Reproducible Test Case
MinimalStatusBarBug.java
Minimal test using standard JLine3 APIs following official documentation. This demonstrates the bug with vanilla JLine3 - no custom code or workarounds.
Compile:
javac -cp "jline3/terminal/target/jline-terminal-3.30.4.jar:jline3/reader/target/jline-reader-3.30.4.jar" MinimalStatusBarBug.javaRun:
java -cp ".:jline3/terminal/target/jline-terminal-3.30.4.jar:jline3/reader/target/jline-reader-3.30.4.jar" MinimalStatusBarBugSteps to reproduce:
- Run the program
- Observe status bar at bottom showing "Status Bar - Resize the terminal vertically to see the bug"
- Resize terminal vertically (drag window taller or shorter)
- BUG: Old status bar remains visible at old position
- Press Enter - the old status bar disappears
- Type
quitto exit
##code :
// Source code is decompiled from a .class file using FernFlower decompiler (from Intellij IDEA).
import java.io.IOException;
import java.util.Collections;
import org.jline.reader.LineReader;
import org.jline.reader.LineReaderBuilder;
import org.jline.terminal.Terminal;
import org.jline.terminal.TerminalBuilder;
import org.jline.utils.AttributedString;
import org.jline.utils.Status;
public class MinimalStatusBarBug {
public MinimalStatusBarBug() {
}
public static void main(String[] var0) throws IOException {
Terminal var1 = TerminalBuilder.builder().system(true).build();
LineReader var2 = LineReaderBuilder.builder().terminal(var1).appName("MinimalTest").build();
Status var3 = Status.getStatus(var1, true);
var3.update(Collections.singletonList(new AttributedString("Status Bar - Resize the terminal vertically to see the bug")));
System.out.println("=== Minimal JLine3 Status Bar Bug Reproduction ===");
System.out.println();
System.out.println("Bug reproduction steps:");
System.out.println("1. You should see a status bar at the bottom");
System.out.println("2. Resize the terminal vertically (make it taller or shorter)");
System.out.println("3. BUG: The old status bar stays at its old position");
System.out.println("4. Press Enter - the old status bar disappears");
System.out.println();
System.out.println("Type 'quit' to exit");
System.out.println();
while(true) {
String var4 = var2.readLine("> ");
if (var4 == null || "quit".equalsIgnoreCase(var4.trim())) {
var3.update(Collections.emptyList());
var1.close();
return;
}
System.out.println("Input: " + var4);
}
}
}Metadata
Metadata
Assignees
Labels
No labels