github / github/copilot-cli

Copy/Paste not working properly when selecting text from the Timeline

未关闭
#3,496 1 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
area:input-keyboard area:platform-windows
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

For the past few release, starting around 1.50, copying selected text from the Timeline has not been working correctly. This only happens when the selected text is on a single line. If the selection spans more than one line, the copy/paste will work correctly.

This is happening in the Terminal in VS Code and Windows Terminal (for both underlying Command Prompt and PowerShell 7.x). This same behavior is also occurring on multiple computers.

When I select text to copy and use either right-click or ctrl+c, I get the copied to clipboard message in the CLI Footer, but what gets pasted is not what I had selected to copy. The pasted text is text that exists in the Timeline, but it's not the intended text at all.

For example, I ran /version to get my current CLI version. I just tried to copy/paste the value and it definitely was not the version text that I had selected to copy.

Lastly, this is the only program where I am experiencing this behavior.

### Affected version

1.0.52-4

### Steps to reproduce the behavior

1. Run /version
2. Select the only relevant part of the output
3. right-click or ctrl+c the selected text
4. Observe the "copied to clipboard" message in the footer
5. Paste the value in any other program, say Notepad
6. Observe the pasted text is not the text that was selected to be copied. It's text from within the Timeline, just not the intended text.

### Expected behavior

The pasted text should be the text that was selected.

### Additional context

- Windows 11 25H2
- AMD64

贡献指南

打开贡献指南

调研方向

在 Timeline 中运行 /version,选择单行文本,使用右键或 Ctrl+C 进行复制,然后粘贴到 Notepad,以重现该问题。在 Windows Terminal 的 CLI 中比较单行选择和多行选择;当粘贴的值与所选文本完全一致,且页脚仍然报告复制操作时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。