mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #693] Unwanted artifacts on screen when scrolling text with a lot of unicode characters #507
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @darkhz on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/693
While dealing with text that has a lot of unicode, the characters end up "stuck" on the screen, and in the case of the table, the selector malfunctions. Please take a look at the video.
@rivo @tslocum, I'm really sorry for tagging, but I believe this issue to be critical. Any advise would be much appreciated.
https://user-images.githubusercontent.com/44058754/150971461-9a763188-14b6-4552-a328-c5d94dd08e15.mp4
@darkhz commented on GitHub (Jan 26, 2022):
An update on this issue:
The bug occurs on this line (util.go)
screen.SetContent(finalX+offset, y, main, comb, finalStyle)Writing certain combined runes (?) to the output can cause the entire UI to break, with text being rendered incorrectly and so on.
Setting
combtoniltemporarily solves this issue. I can provide another video to show this issue if you'd like.@tslocum commented on GitHub (Jan 28, 2022):
Please share the text that causes this breakage as well as the application code responsible for displaying it.
@darkhz commented on GitHub (Jan 30, 2022):
@tslocum apologies for the delay.
The application code is simple enough, it can be anything that displays/handles text like a Table/TableCell, InputField, TextView, etc.
You should notice certain characters "sticking" inside the inputfield.
(Weirdly, some editors like vim and micro also have problems with rendering combined runes. Micro handles unicode in a somewhat similar manner to tview, and the same thing occurs while editing text in micro - the entire UI breaks)
@rivo commented on GitHub (Feb 16, 2022):
Seems to be related to some issues in other packages. I've opened up issue gdamore/tcell#515.
@rivo commented on GitHub (Feb 16, 2022):
Also mattn/go-runewidth#59.
@rivo commented on GitHub (Sep 11, 2022):
I made a suggestion over at
go-runewidth, see https://github.com/mattn/go-runewidth/issues/59#issuecomment-1242923961, and also submitted a PR (https://github.com/mattn/go-runewidth/pull/63). When this PR gets accepted, your problem should be solved, at least after this change propagates viatcell(@gdamore) totview.I don't know how fast @mattn is with this. We'll see.
@rivo commented on GitHub (Aug 26, 2023):
Is this issue still relevant? I believe Unicode should work properly now. If there is no further comment soon, I will close this issue.