feat(editor): Open in New Window uses a lightweight editor window (#4368)

Open in New Window on a project file's tab now opens an editor-only window (editor-<parent>-n) instead of a second project workbench. It shares the parent's documents and language servers; unsaved text, caret and selection move with the tab, and the source tab is removed only after the new window reports ready. Files outside the project keep opening a full window.

Review changes: closing the window settles only its own unsaved files (the project window's guard also asked to terminate running processes); Escape no longer closes it; error messages go through the text catalog; the window has its own stylesheet.

Closes #4117

Co-authored-by: GGVidal <52431033+GGVidal@users.noreply.github.com>
This commit is contained in:
Gabriel Gondim
2026-11-19 08:36:35 +08:00
committed by GitHub
parent 7c3b40b1c4
commit 4e8a392fed
18 changed files with 543 additions and 26 deletions
+40
View File
@@ -0,0 +1,40 @@
.window {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
background: var(--bg-app);
color: var(--fg);
}
/* Linux: frameless X11 windows have no shadow, so mark the edge in CSS. */
.edge {
position: relative;
}
.edge::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
box-shadow: inset 0 0 0 1px var(--border-window);
}
.loading {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
gap: var(--space-2);
color: var(--fg-muted);
}
.body {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
}
.error {
padding: var(--space-4);
color: var(--danger);
font-size: var(--fs-small);
}