Escape + ANSI shifts color and cuts final char #79

Open
opened 2021-10-14 16:45:12 +00:00 by makeworld · 1 comment

Downstream issue: https://github.com/makeworld-the-better-one/amfora/issues/264

Test case:

package main

import (
        "code.rocketnine.space/tslocum/cview"
)

func main() {
        app := cview.NewApplication()

        tv := cview.NewTextView()
        tv.SetDynamicColors(true)
        tv.SetText(cview.TranslateANSI(cview.Escape("[TEST\033[0m]\033[36mTEST")))
        app.SetRoot(tv, true)
        if err := app.Run(); err != nil {
                panic(err)
        }
}

Compare the output with the output of echo '[TEST\033[0m]\033[36mTEST' in your terminal.

Downstream issue: https://github.com/makeworld-the-better-one/amfora/issues/264 Test case: ```go package main import ( "code.rocketnine.space/tslocum/cview" ) func main() { app := cview.NewApplication() tv := cview.NewTextView() tv.SetDynamicColors(true) tv.SetText(cview.TranslateANSI(cview.Escape("[TEST\033[0m]\033[36mTEST"))) app.SetRoot(tv, true) if err := app.Run(); err != nil { panic(err) } } ``` Compare the output with the output of `echo '[TEST\033[0m]\033[36mTEST'` in your terminal.
tslocum added the
bug
label 2021-10-15 07:49:52 +00:00

Thanks for reporting this.

This is likely related to #27.

Thanks for reporting this. This is likely related to #27.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/cview#79
There is no content yet.