@@ -372,19 +372,20 @@ func (c *Canvas) getLinesForSegment(segment rune) []Line {
372
372
return nil
373
373
}
374
374
375
- return c .getLines (iter , segment , passThroughs , orientation )
375
+ return c .getLines (segment , iter , orientation , passThroughs )
376
376
}
377
377
378
- // ci: the order that we traverse locations on the canvas.
379
- // segment: the primary character we're tracking for this line.
380
- // passThroughs: characters the line segment is allowed to be drawn underneath
381
- // (without terminating the line).
378
+ // segment: the primary character expected along a continuing Line
379
+ // ci: the order that the loop below traverse locations on the canvas.
382
380
// orientation: the orientation for this line.
381
+ // passThroughs: characters that will produce a mark that the line segment
382
+ // is allowed to be drawn either through or, in the case of 'o', "underneath" --
383
+ // without terminating the line.
383
384
func (c * Canvas ) getLines (
384
- ci canvasIterator ,
385
385
segment rune ,
386
- passThroughs [] rune ,
386
+ ci canvasIterator ,
387
387
o Orientation ,
388
+ passThroughs []rune ,
388
389
) (lines []Line ) {
389
390
// Helper to throw the current line we're tracking on to the slice and
390
391
// start a new one.
@@ -401,6 +402,7 @@ func (c *Canvas) getLines(
401
402
currentLine := Line {orientation : o }
402
403
lastSeenRune := ' '
403
404
405
+ // X Purpose of the '+1' overscan is to reset lastSeenRune to ' ' upon wrapping the minor axis.
404
406
for idx := range ci (c .Width + 1 , c .Height + 1 ) {
405
407
r := c .runeAt (idx )
406
408
0 commit comments