(clr aec.ANSI, s string)
| 511 | } |
| 512 | |
| 513 | func (h imgColumn) PrintL(clr aec.ANSI, s string) string { |
| 514 | ln := tui.Width(s) |
| 515 | |
| 516 | fill := h.Width - ln |
| 517 | |
| 518 | if fill < 0 { |
| 519 | if h.NoEllipsis { |
| 520 | fill = 0 |
| 521 | } else { |
| 522 | return clr.Apply(tui.Ellipsis(s, h.Width)) |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | return clr.Apply(s) + strings.Repeat(" ", fill) |
| 527 | } |
| 528 | |
| 529 | func (h imgColumn) PrintR(clr aec.ANSI, s string) string { |
| 530 | ln := tui.Width(s) |