SetDiffBase sets the text that is used as the base for diffing the buffer content
(diffBase []byte)
| 1404 | |
| 1405 | // SetDiffBase sets the text that is used as the base for diffing the buffer content |
| 1406 | func (b *Buffer) SetDiffBase(diffBase []byte) { |
| 1407 | b.diffBase = diffBase |
| 1408 | if diffBase == nil { |
| 1409 | b.diffBaseLineCount = 0 |
| 1410 | } else { |
| 1411 | b.diffBaseLineCount = strings.Count(string(diffBase), "\n") |
| 1412 | } |
| 1413 | b.UpdateDiff() |
| 1414 | } |
| 1415 | |
| 1416 | // DiffStatus returns the diff status for a line in the buffer |
| 1417 | func (b *Buffer) DiffStatus(lineN int) DiffStatus { |
nothing calls this directly
no test coverage detected