(start, count int)
| 101 | } |
| 102 | |
| 103 | func hunkRange(start, count int) string { |
| 104 | if count == 0 { |
| 105 | return fmt.Sprintf("%d,0", start-1) |
| 106 | } |
| 107 | if count == 1 { |
| 108 | return fmt.Sprintf("%d", start) |
| 109 | } |
| 110 | return fmt.Sprintf("%d,%d", start, count) |
| 111 | } |
| 112 | |
| 113 | // splitKeepEnd splits s into lines, each keeping its "\n"; a last line |
| 114 | // without one is kept as is. |