( cell: SplitLineCell, lineNumberDigits: number, showLineNumbers: boolean, )
| 161 | |
| 162 | /** Build the split-view gutter text shared by the TUI and clipboard renderers. */ |
| 163 | export function splitGutterText( |
| 164 | cell: SplitLineCell, |
| 165 | lineNumberDigits: number, |
| 166 | showLineNumbers: boolean, |
| 167 | ) { |
| 168 | if (!showLineNumbers) { |
| 169 | return `${cell.sign} `; |
| 170 | } |
| 171 | |
| 172 | const number = cell.lineNumber |
| 173 | ? String(cell.lineNumber).padStart(lineNumberDigits, " ") |
| 174 | : " ".repeat(lineNumberDigits); |
| 175 | return `${number} ${cell.sign}`; |
| 176 | } |
no outgoing calls
no test coverage detected