From b13ced9c91025a246f86345d949570170a653f82 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 19 Dec 2023 10:21:07 -0500 Subject: [PATCH 1/2] Show color decorators in all documents --- packages/vscode-tailwindcss/src/extension.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/vscode-tailwindcss/src/extension.ts b/packages/vscode-tailwindcss/src/extension.ts index f3860271..e7121211 100755 --- a/packages/vscode-tailwindcss/src/extension.ts +++ b/packages/vscode-tailwindcss/src/extension.ts @@ -613,9 +613,14 @@ export async function activate(context: ExtensionContext) { }) } - Window.visibleTextEditors - .find((editor) => editor.document === document) - ?.setDecorations( + let editors = Window.visibleTextEditors.filter( + (editor) => editor.document === document + ) + + // Make sure we show document colors for all visible editors + // Not just the first one for a given document + editors.forEach((editor) => { + editor.setDecorations( colorDecorationType, nonEditableColors.map(({ range, color }) => ({ range, @@ -628,6 +633,7 @@ export async function activate(context: ExtensionContext) { }, })) ) + }) return editableColors }, From 032416c06520acd23bdd9c3d6b383dd0727e73e5 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 19 Dec 2023 13:04:11 -0500 Subject: [PATCH 2/2] Update changelog --- packages/vscode-tailwindcss/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vscode-tailwindcss/CHANGELOG.md b/packages/vscode-tailwindcss/CHANGELOG.md index f4a3cf32..a0443452 100644 --- a/packages/vscode-tailwindcss/CHANGELOG.md +++ b/packages/vscode-tailwindcss/CHANGELOG.md @@ -3,6 +3,7 @@ ## 0.11.x (Pre-Release) - Enable Sort Selection on a remote host (#878) +- Show color decorators in split editors (#888) ## 0.10.2