MCPcopy Create free account
hub / github.com/JanSmrcka/differ / renderDiffLine

Function renderDiffLine

internal/ui/diff.go:163–170  ·  view source on GitHub ↗
(dl DiffLine, filename string, styles Styles, t theme.Theme, width int)

Source from the content-addressed store, hash-verified

161}
162
163func renderDiffLine(dl DiffLine, filename string, styles Styles, t theme.Theme, width int) string {
164 switch dl.Type {
165 case LineHunkHeader:
166 return renderHunkLine(dl, styles, width)
167 default:
168 return renderCodeLine(dl, filename, styles, t, width)
169 }
170}
171
172func renderHunkLine(dl DiffLine, styles Styles, width int) string {
173 prefix := styles.DiffLineNum.Render(" ··· ")

Callers 1

RenderDiffFunction · 0.85

Calls 2

renderHunkLineFunction · 0.85
renderCodeLineFunction · 0.85

Tested by

no test coverage detected