-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Emoji can leave artifacts in right cell #1502
Comments
Two possible solutions come to my mind:
|
I thought this was already supported, might have been broken in some cases recently? |
There is the |
Yeah I think it used to, if a cell is overlapping it must be drawn at the same time as its neighbouring cell, and if it's removed the neighbouring cell needs to be redrawn as well. |
Read the original issue - the example the OP gave with the aubergines looks like it is wcwidth related, where the system wcwidth gives 2 and xterm.js's 1. This would explain why the OP can move the cursor further back into the prompt. I dont have Ubuntu 18 here - can someone with Ubuntu 18 test the system wcwidth for Edit: |
To elaborate on what I think @Tyriar was trying to get at, we clear entire rows at a time: xterm.js/src/renderer/TextRenderLayer.ts Line 213 in fb63b34
There should be one
I'm not on Ubuntu 18, but I'm on Debian Stable, which is a lot closer than Ubuntu 14. On my machine, wcwidth for 🍆 is 2: The program if anyone wants it for testing: #define _XOPEN_SOURCE
#include <stdio.h>
#include <stddef.h>
#include <wchar.h>
#include <locale.h>
int main() {
wchar_t wc = L'\U0001F346';
setlocale(LC_ALL, "en_US.UTF-8");
wprintf(L"%d, %lc\n", wcwidth(wc), wc);
} I think this has to be a bug in the parser (maybe the wcwidth stuff). I don't see how it could happen from looking at the renderer. |
Oh I forgot about that 😅. I'm quite puzzled as to how this is happening then as the emoji would need to be drawn, but it looks like the class of bugs where the right is not "cleared" (which can't happen because we always clear and redraw the cells now). |
@bgw Thanks for testing - yupp this is a bug in wcwidth, which returns 1 here. This is a case where the backend wcwidth and our wcwidth return different values for a specific char (see #1467 (comment) for the background). We can fix it by applying custom settings once #1470 is done. |
I don't think this happens anymore. |
See microsoft/vscode#51385 (comment)
The text was updated successfully, but these errors were encountered: