diff options
| author | Jeff Carr <[email protected]> | 2019-05-29 11:25:25 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-29 11:25:25 -0700 |
| commit | 69e42973663c826ad8143e64d951ba6eaf63d995 (patch) | |
| tree | 4dbe432259b14aca79f6b64caf9adb0697dde806 /area.go | |
| parent | 5bc0e15b3d163d3b2eadb1e25654ed0147b8f880 (diff) | |
remove the myAH stand alone variable
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'area.go')
| -rw-r--r-- | area.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -63,6 +63,15 @@ func makeSplashArea(ah *AreaHandler) { } } +func AreaAppendText(newText *ui.AttributedString, what string, attrs ...ui.Attribute) { + start := len(newText.String()) + end := start + len(what) + newText.AppendUnattributed(what) + for _, a := range attrs { + newText.SetAttribute(a, start, end) + } +} + func appendWithAttributes(newText *ui.AttributedString, what string, attrs ...ui.Attribute) { start := len(newText.String()) end := start + len(what) |
