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

mods/diff: three hook files are formatted as the rest areBrowse files
poteat authored on Sep 11, 2026 parent ee5d2e5 · commit 4d63891b4fe2
3 changed files+7 -4compared with ee5d2e5
Mmods/diff/hooks/ask/fitted-ask-text-of.ts
Mmods/diff/hooks/views/current-pane/message-pane-of/message-pane-of.tsx
Mmods/diff/hooks/views/layout/wrapped-lines/wrapped-lines.ts
@@ -8,7 +8,10 @@
88 * @param room the characters the context has left
99 * @returns the text to attach, or undefined when not even its first line fits
1010 */
11-export function fittedAskTextOf(text: string, room: number): string | undefined {
11+export function fittedAskTextOf(
12+ text: string,
13+ room: number,
14+): string | undefined {
1215 if (text.length <= room) {
1316 return text
1417 }
@@ -49,8 +49,7 @@
4949 const middleRows = kit.rows - top.length - 1 - (earlier === null ? 0 : 3)
5050 const above = Math.floor((middleRows - lines.length) / 2)
5151 const isCentered =
52- rest.length === 0 &&
53- middleRows - above - lines.length >= controlRows.length
52+ rest.length === 0 && middleRows - above - lines.length >= controlRows.length
5453
5554 if (!isCentered) {
5655 return (
@@ -29,7 +29,8 @@
2929 }
3030
3131 if (wordWidth > width) {
32- const breaksHere = 1 + Math.floor((wordWidth - (width - rowWidth) - 1) / width)
32+ const breaksHere =
33+ 1 + Math.floor((wordWidth - (width - rowWidth) - 1) / width)
3334 const breaksNext = Math.floor((wordWidth - 1) / width)
3435
3536 if (breaksNext < breaksHere) {