fix(editor): collapse empty icon gutters (#2566)

The run, npm-script, HTTP-endpoint and bookmark gutters reserved a column even when a file had none of their icons, pushing the code right by an empty strip. Each now emits a zero-width, non-interactive spacer marker when it has nothing to show, so the column collapses; files with icons are unchanged. A shared `gutterSpacer` factory keeps the spacer from reacting to clicks.

Co-authored-by: muutot <92625353+muutot@users.noreply.github.com>
This commit is contained in:
Muu
2026-11-11 01:39:06 +08:00
committed by GitHub
co-authored by muutot
parent 481cf172b5
commit c088fa8b26
7 changed files with 47 additions and 15 deletions
@@ -1,11 +1,11 @@
/* Editor gutter ▶ per request (same look as run configuration targets). */
.runGutter {
width: 14px;
}
/* No fixed width: the endpoints gutter is conditional (updateSpacer), so files
without endpoint markers keep a narrow gutter. */
.runGutter :global(.cm-gutterElement) {
display: flex;
align-items: center;
justify-content: center;
/* Spare width stays left of the icons, which sit next to the code. */
justify-content: flex-end;
}
.runMarker {
width: 14px;