feat(ui): make preview panes selectable and copyable (#1127)

The workbench disables selection globally, so the read-only preview panes beside result trees (TODO, Usages, Problems…) could not be selected or copied. The pane opts back in (user-select: text) and uses useSelectionBoundary so drags stay inside it; the line-number gutter stays unselectable so copied text is code only.

Co-authored-by: qtvbwfn <5848026+qtvbwfn@users.noreply.github.com>
This commit is contained in:
Qing
2026-11-04 08:54:25 +08:00
committed by GitHub
co-authored by qtvbwfn
parent 53b8cdeb51
commit e5718d41d8
3 changed files with 70 additions and 9 deletions
+7
View File
@@ -11,6 +11,10 @@
font-size: var(--fs-ui);
line-height: 19px;
color: var(--fg);
/* The workbench disables selection globally; preview text stays selectable/copyable. */
-webkit-user-select: text;
user-select: text;
cursor: text;
}
.empty {
display: flex;
@@ -41,6 +45,9 @@
text-align: right;
color: var(--fg-gutter);
background-color: var(--bg-app);
/* Copying the code leaves the line numbers out. */
-webkit-user-select: none;
user-select: none;
}
.currentLine .gutter {
color: var(--fg-muted);