spacehub

surshar / claude-code

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.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / views / inset-of / inset-of.ts
15 lines · 496 BRaw
1import Limits from '../../limits'
2import type { Kit } from '../kit'
3
4/**
5 * A drawing's kit inside the docked pane's padding: the built-in's blank
6 * last column and its blank row above the header taken off.
7 *
8 * @param kit the drawing's kit at the pane's full size
9 * @returns the kit its body draws with
10 */
11export const insetOf = (kit: Kit): Kit => ({
12 ...kit,
13 columns: Math.max(1, kit.columns - Limits.PANE_RIGHT_PAD_COLUMNS),
14 rows: Math.max(0, kit.rows - Limits.PANE_TOP_PAD_ROWS),
15})