'selected' means you've got it highlighted with your cursor 'included' means the line has been included in the patch (only applicable when building a patch)
(str string, textStyle style.TextStyle, included bool)
| 129 | // 'included' means the line has been included in the patch (only applicable when |
| 130 | // building a patch) |
| 131 | func (self *patchPresenter) formatLineAux(str string, textStyle style.TextStyle, included bool) string { |
| 132 | if self.plain { |
| 133 | return str |
| 134 | } |
| 135 | |
| 136 | firstCharStyle := textStyle |
| 137 | if included { |
| 138 | firstCharStyle = firstCharStyle.MergeStyle(style.BgGreen) |
| 139 | } |
| 140 | |
| 141 | if len(str) < 2 { |
| 142 | return firstCharStyle.Sprint(str) |
| 143 | } |
| 144 | |
| 145 | return firstCharStyle.Sprint(str[:1]) + textStyle.Sprint(str[1:]) |
| 146 | } |
no test coverage detected