MCPcopy
hub / github.com/jesseduffield/lazygit / patchLineStyle

Method patchLineStyle

pkg/commands/patch/format.go:111–120  ·  view source on GitHub ↗
(patchLine *PatchLine)

Source from the content-addressed store, hash-verified

109}
110
111func (self *patchPresenter) patchLineStyle(patchLine *PatchLine) style.TextStyle {
112 switch patchLine.Kind {
113 case ADDITION:
114 return style.FgGreen
115 case DELETION:
116 return style.FgRed
117 default:
118 return theme.DefaultTextColor
119 }
120}
121
122func (self *patchPresenter) formatLine(str string, textStyle style.TextStyle, index int) string {
123 included := self.incLineIndices.Includes(index)

Callers 1

formatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected