Skip to content

Screen clear does not work properly when starting Copilot — previous output remains visible #7

@trsdn

Description

@trsdn

Description

When starting Copilot, the screen is not properly cleared. Previous terminal output remains visible on screen, and the user has to wait until new output overwrites it line by line. It appears the clear/reset escape sequences are not being handled correctly in the Swift terminal emulator.

Expected Behavior

When a clear screen command is issued (e.g. \e[2J, \e[H\e[2J, or similar ANSI escape sequences), the entire visible screen should be erased immediately and the cursor should be repositioned, just like in a standard terminal emulator.

Likely Cause

The terminal emulator may not be correctly processing one or more of the following ANSI escape sequences:

  • \e[2J — Erase entire screen
  • \e[3J — Erase scrollback buffer
  • \e[H — Move cursor to home position

Alternatively, the screen buffer may not be resized or flushed properly after a clear, leaving stale content visible until it gets overwritten by new output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions