ANSI conversion is incomplete #48
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tslocum/cview#48
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Try test.ans for example, and compare doing
cat test.ans | less -r
with it, versus usingcview.TranslateANSI
in aTextView
. The colors are much darker, and more importantly, some of the blocks just seem incorrect? For example, compare the face half the way down.Use
cat test.ans | less -r
Using cview:
Now I believe the color difference is just my terminal, but the glitching is an issue.
To try this out easily, you can use the code sample you gave me here, but just
cat
the ANSI file instead.Also there appears to be some actual color issues (not just brighter) if you compare the beginning of the file.
i had the same issue. maybe it's a bug in the util overlayStyle. It's using the defaultStyle for mixing but the defaultStyle in the TextView is missing a backgorund color, so backgorund resets fail for my terminal (st). for a quick fix i have changed this line in textview.go from
to
and later added a dedicated backgroundColor to the textview struct, like textColor
@L00M Thanks for looking into this. Could you try your changes with my example test file? Because it looks to me like more than just some background reset issues, but maybe I'm wrong about that.
i don't know. The script does not work for me.
but i had output issues when not using a background in the default style, justmodify the textintput.go file in your GOSOurce Folder and try it by your self.
The colors seem to be fixed now. Let me know if you are still seeing any discrepancies there. As far as some ANSI characters not translating correctly, I would appreciate some help with this.
Ok, I can confirm that the color is fixed, thanks! I'm not sure if I can help with the translation, but if I can I'll make a PR.