mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-07-17 13:35:16 +03:00
fix(installer): clear-to-end-of-line per row so frames don't bleed
draw_frame only cleared below the frame (\033[0J), so when a new screen's lines were shorter than the previous screen's, the old tails (tool paths, warnings) bled through on the right. Now erase-to-eol (\033[K) on every line before the screen-clear. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-3
@@ -153,8 +153,11 @@ read_key() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# draw_frame <buffer> — home cursor and paint a pre-composed frame, clearing
|
# draw_frame <buffer> — home cursor and paint a pre-composed frame.
|
||||||
# trailing lines (flicker-free: one write, then clear-to-end-of-screen).
|
# Flicker-free: erase-to-end-of-line (\033[K) on every line so a shorter new
|
||||||
|
# line never leaves the previous frame's tail behind, then erase-to-end-of-
|
||||||
|
# screen (\033[0J) to drop any leftover lines below the frame.
|
||||||
draw_frame() {
|
draw_frame() {
|
||||||
printf '\033[H%s\033[0J' "$1"
|
local buf="${1//$'\n'/$'\033[K'$'\n'}"
|
||||||
|
printf '\033[H%s\033[K\033[0J' "$buf"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user