You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EmulatorView: fix linkification on non-basic lines
Linkification currently assumes that each char in the array representing
the line maps one-to-one onto a screen column. However, this is
demonstrably false in a Unicode environment, where one screen column can
take an arbitrary number of chars (surrogate pairs and/or combining
characters) and one char can take two screen columns (East Asian wide
characters in the BMP). As a result, links end up misplaced on lines
where these more advanced Unicode features are in use.
To fix this, we need to properly determine the screen columns the link
spans, taking into account the above; unfortunately, there appears to be
no way short of iterating over the entire line up to that point to
discover this. To lessen the performance hit, we add support to
UnicodeTranscript and TranscriptScreen to allow EmulatorView to
determine if scanning the entire line is necessary and only scan the
line if we must.
0 commit comments