Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript

mods/diff: context lines draw on no background, not the cyan background-task accent

poteat573ada6dd0c2
diff --git a/mods/diff/hooks/views/detail/backgrounds/backgrounds.ts b/mods/diff/hooks/views/detail/backgrounds/backgrounds.ts
index 78cc8069..94d86006 100644
--- a/mods/diff/hooks/views/detail/backgrounds/backgrounds.ts
+++ b/mods/diff/hooks/views/detail/backgrounds/backgrounds.ts
@@ -2,10 +2,12 @@ import type Types from '../types'
/**
* The theme key behind a run of each kind: the diff's added and removed
- * bands, the plain background behind context.
+ * bands. A context run has none and draws on the terminal's own background
+ * (the theme's `background` key is the background-task accent, a cyan).
*/
-export const BACKGROUNDS: Readonly<Record<Types.LineKind, string>> = {
- added: 'diffAdded',
- removed: 'diffRemoved',
- context: 'background',
-}
+export const BACKGROUNDS: Readonly<Record<Types.LineKind, string | undefined>> =
+ {
+ added: 'diffAdded',
+ removed: 'diffRemoved',
+ context: undefined,
+ }
diff --git a/mods/diff/hooks/views/detail/word-backgrounds/word-backgrounds.ts b/mods/diff/hooks/views/detail/word-backgrounds/word-backgrounds.ts
index 01a8bd2b..65570c65 100644
--- a/mods/diff/hooks/views/detail/word-backgrounds/word-backgrounds.ts
+++ b/mods/diff/hooks/views/detail/word-backgrounds/word-backgrounds.ts
@@ -1,11 +1,13 @@
import type Types from '../types'
/**
- * The theme key behind a changed word of each kind (a context line never
- * carries one).
+ * The theme key behind a changed word of each kind; a context line never
+ * carries one, so it has none.
*/
-export const WORD_BACKGROUNDS: Readonly<Record<Types.LineKind, string>> = {
+export const WORD_BACKGROUNDS: Readonly<
+ Record<Types.LineKind, string | undefined>
+> = {
added: 'diffAddedWord',
removed: 'diffRemovedWord',
- context: 'background',
+ context: undefined,
}