Do not apply nth style when the whole range is covered

This commit is contained in:
Junegunn Choi
2025-01-16 10:05:26 +09:00
parent b712f2bb6a
commit 1313510890
3 changed files with 25 additions and 2 deletions

View File

@@ -18,6 +18,10 @@ type Range struct {
end int
}
func (r Range) IsFull() bool {
return r.begin == rangeEllipsis && r.end == rangeEllipsis
}
func RangesToString(ranges []Range) string {
strs := []string{}
for _, r := range ranges {