(patchLine *PatchLine)
| 109 | } |
| 110 | |
| 111 | func (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 | |
| 122 | func (self *patchPresenter) formatLine(str string, textStyle style.TextStyle, index int) string { |
| 123 | included := self.incLineIndices.Includes(index) |