mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix rendering issues for emojis that come out as wide chars
The fix is to disallow non-single cell width chars to be overlapping
This commit is contained in:
@@ -183,10 +183,15 @@ export class TextRenderLayer extends BaseRenderLayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a character is overlapping to the
|
||||
* next cell.
|
||||
* Whether a character is overlapping to the next cell.
|
||||
*/
|
||||
private _isOverlapping(charData: CharData): boolean {
|
||||
// Only single cell characters can be overlapping, rendering issues can
|
||||
// occur without this check
|
||||
if (charData[CHAR_DATA_WIDTH_INDEX] !== 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We assume that any ascii character will not overlap
|
||||
const code = charData[CHAR_DATA_CODE_INDEX];
|
||||
if (code < 256) {
|
||||
|
||||
Reference in New Issue
Block a user