fix: check-status.py smooth in-place redraw, remove comment bars
- Use \033[H\033[J (home + clear-to-end) instead of just \033[H to prevent stale lines from previous frames persisting when output shrinks between refreshes. - Fix cursor restore on exit: was \033[?25l (hide) instead of \033[?25h (show), leaving terminal with invisible cursor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fix/kind-mount-propagation
parent
9009fb0363
commit
6464492009
|
|
@ -266,8 +266,8 @@ def display(watch: bool, prev_lines: int) -> int:
|
|||
cols = shutil.get_terminal_size().columns
|
||||
|
||||
if watch:
|
||||
# Move cursor to top-left without clearing — overwrite in place
|
||||
sys.stdout.write("\033[H")
|
||||
# Move home; clear from cursor to end of screen to wipe stale content
|
||||
sys.stdout.write("\033[H\033[J")
|
||||
|
||||
for line in output:
|
||||
# Pad to terminal width to overwrite stale characters from prior frame
|
||||
|
|
@ -325,7 +325,7 @@ def main() -> int:
|
|||
finally:
|
||||
if args.watch:
|
||||
# Show cursor again
|
||||
sys.stdout.write("\033[?25l\n")
|
||||
sys.stdout.write("\033[?25h\n")
|
||||
sys.stdout.flush()
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue