дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
feat(scheme): support a selection foreground colour (#2446)
Settings › Editor › Color Scheme › General › Editor gains a Selection foreground attribute next to Selection background, wired to a new --fg-editor-selection token. The editor paints selected text with it (.cm-openidea-selected, including the diff viewer); unset it keeps the previous rendering, with syntax colours showing through (token default: inherit). .icls import/export round trips it via SELECTION_FOREGROUND.
Цей коміт міститься в:
1 джерело
876faa7ba2
коміт
ddea0e6be5
11 files changed
+67
-3
No files matched your search
@@ -159,6 +159,17 @@ describe("IntelliJ theme import", () => {
|
||||
expect(s).toBeNull();
|
||||
});
|
||||
|
||||
it("maps the selection foreground colour (#2446)", () => {
|
||||
const s = convertIcls(`<scheme name="Sel" version="142" parent_scheme="Default"><colors>
|
||||
<option name="SELECTION_BACKGROUND" value="214283" />
|
||||
<option name="SELECTION_FOREGROUND" value="112233" />
|
||||
</colors></scheme>`);
|
||||
expect(s.tokens).toMatchObject({
|
||||
"--bg-editor-selection": "#214283",
|
||||
"--fg-editor-selection": "#112233",
|
||||
});
|
||||
});
|
||||
|
||||
it("only targets tokens that exist in tokens.css", () => {
|
||||
const declared = new Set([...css.matchAll(/(--[a-z0-9-]+)\s*:/g)].map((m) => m[1]!));
|
||||
// Read with a fallback by the editor (no tokens.css default), still themeable.
|
||||
|
||||
Reference in new issue
Заблокувати користувача