diff --git a/ansi.go b/ansi.go index 4d14c28..4d0b2d9 100644 --- a/ansi.go +++ b/ansi.go @@ -127,6 +127,7 @@ func (a *ansi) Write(text []byte) (int, error) { "#ffffff", }[colorNumber] } + FieldLoop: for index, field := range fields { switch field { case "1", "01": @@ -185,6 +186,7 @@ func (a *ansi) Write(text []byte) (int, error) { background = color } } + break FieldLoop } } if len(attributes) > 0 || clearAttributes { diff --git a/application.go b/application.go index 03d5f0d..05a4357 100644 --- a/application.go +++ b/application.go @@ -81,7 +81,7 @@ func NewApplication() *Application { // // Note that this also affects the default event handling of the application // itself: Such a handler can intercept the Ctrl-C event which closes the -// applicatoon. +// application. func (a *Application) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *Application { a.inputCapture = capture return a