Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions aceclaw-cli/src/main/java/dev/aceclaw/cli/TerminalRepl.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,9 @@ private Thread startUiRenderer(AtomicBoolean stopFlag, LineReader reader) {
boolean didPrintAbove = false;
if (!pendingPrintAbove.isEmpty() && readingPrompt && !isPermissionModalActive()) {
for (String text : pendingPrintAbove) {
// Split multi-line content into individual printAbove calls.
// JLine's AttributedString is single-line oriented; passing
// large multi-line ANSI strings to fromAnsi() can lose content.
// Use split with -1 to preserve all lines faithfully.
// Trailing blank lines are stripped at each producer site
// (renderSchedulerEventNote, renderDeferredEventNote, etc.)
// rather than here, to avoid silently swallowing intentional
// trailing newlines from other producers.
String[] lines = text.split("\n", -1);
// Strip trailing blank lines before splitting to avoid
// empty printAbove() calls that produce visible blank lines.
String[] lines = text.stripTrailing().split("\n", -1);
for (String line : lines) {
try {
reader.printAbove(AttributedString.fromAnsi(line));
Expand Down
Loading