feat(database): preview the console's execution range with a border (#5694)

A console now borders the SQL an Execute would submit: the caret's statement, or the selected statements, using the same db_statements split the run makes, so what is shown and what is submitted cannot differ. While a run is in progress its submitted range stays bordered as the caret moves. The selection is never changed.

The border is one box around each statement's text, drawn on an editor layer, in the accent colour with a soft fill (light and dark themes). Typing waits for a 150 ms pause before splitting again; caret moves update at once.

Closes #5524

Co-authored-by: Inf1mum <[email protected]>
Цей коміт міститься в:
Vadim LazukтаInf1mum authored and GitHub committed 2026-11-25 06:32:30 +08:00
1 джерело fedd5ffd4f
коміт 5567aff80a
3 files changed
+374

No files matched your search

+7
Переглянути файл
@@ -752,6 +752,13 @@
:global(.cm-openidea-db-executing) {
background: var(--accent-soft);
}
/* The range the console's next run would submit (DataGrip's current-statement border). */
:global(.cm-openidea-db-preview) {
box-sizing: border-box;
background: color-mix(in srgb, var(--accent) 8%, transparent);
border: 1px solid var(--accent);
border-radius: 3px;
}
:global(.cm-openidea-db-elapsed) {
font-variant-numeric: tabular-nums;
}