Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing wrapped lines handling and Emoji support #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

afska
Copy link

@afska afska commented Nov 5, 2022

This PR migrates the fix from xtermjs/xterm.js#3718 to this library.
It also add a fix so the underlining and resulting text when calling the callback is right.

Before the fix:
bad1
(no underlining under last s)

bad2
(the last 9 from the first line is missing)

After the fix:
good1
good2

@rob-myers
Copy link

@afska This change to translateBufferLineToStringWithWrap was very helpful:

-    lineString += line.translateToString(true).substring(0, terminal.cols);
+    lineString += line.translateToString(true);

It fixed lineString when it contained emojis and ran over multiple rows, e.g.

ℹ️ [ corridor ]
with 11 doors

The other code broke underlining for me e.g. shifted it right by a single character for the line above.

@afska
Copy link
Author

afska commented Nov 22, 2024

@rob-myers maybe have a look at xtermjs/xterm.js#5223. TL;DR using the latest official web-links plugin fixes most of these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants