Skip to content

Windows Terminal: selecting text and right-clicking to copy blanks the TUI; rows reappear on mouse clicks #4981

Description

@DragonLi-Mi

Describe the bug

After GitHub Copilot CLI has been running interactively for a while, selecting some displayed text with the mouse and then right-clicking to copy frequently causes the entire terminal viewport to turn black.

After the blackout, clicking different rows with the mouse makes content reappear incrementally, row by row, rather than restoring the complete view at once.

This is intermittent but happens with high frequency in my normal usage. The exact session duration or amount of output needed to trigger it has not been isolated.

Affected version

GitHub Copilot CLI 1.0.89-5.

Steps to reproduce the behavior

  1. Start an interactive Copilot CLI session in Windows Terminal.
  2. Use the session for a while so there is conversation output to select.
  3. Select a portion of the displayed text using the mouse.
  4. Right-click to copy the selection.
  5. Observe that the terminal viewport frequently becomes entirely black.
  6. Click different rows in the viewport. Content gradually reappears on those rows instead of the full UI being redrawn.

These steps describe the observed usage pattern, not a deterministic minimal reproduction. I have not yet isolated whether the blackout begins during selection or specifically when right-clicking to copy.

Expected behavior

Selecting and copying text should leave the conversation and input UI visible and usable. Clearing a selection should not blank the viewport or require clicking individual rows to restore the display.

Additional context

Environment collected from the affected machine:

  • OS: Windows, build 10.0.26300.
  • Terminal: Windows Terminal; installed package version 1.24.11911.0. The diagnostic environment has WT_SESSION set.
  • PowerShell version in the diagnostic environment: 7.6.6.
  • Copilot CLI: 1.0.89-5, confirmed with copilot --version.

The distinctive symptom is the partial, row-by-row visual recovery when clicking after the blackout. This may help narrow down a repaint/invalidation problem, but the root cause is not established: it could be in the CLI renderer, Windows Terminal, or their interaction. No claim is made that the CLI process has crashed or that conversation data has been lost.

Not yet isolated: fresh versus long-running sessions, selection versus right-click, keyboard-copy behavior, recovery by resizing, and behavior in another terminal.

Related reports found while checking for duplicates:

These reports may or may not share a root cause.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text inputarea:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminalarea:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formatting

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions