Skip to content

Commit edc38ef

Browse files
committed
Fix charset drawing
Fixes xtermjs#1565
1 parent 0545cfa commit edc38ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/InputHandler.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ export class InputHandler extends Disposable implements IInputHandler {
335335
for (let stringPosition = start; stringPosition < end; ++stringPosition) {
336336
char = data.charAt(stringPosition);
337337
code = data.charCodeAt(stringPosition);
338+
console.log('char', char);
339+
console.log('code', code);
338340

339341
// surrogate pair handling
340342
if (0xD800 <= code && code <= 0xDBFF) {
@@ -359,9 +361,9 @@ export class InputHandler extends Disposable implements IInputHandler {
359361
chWidth = wcwidth(code);
360362

361363
// get charset replacement character
362-
// FIXME: Should code be replaced as well?
363364
if (charset) {
364365
char = charset[char] || char;
366+
code = char.charCodeAt(0);
365367
}
366368

367369
if (screenReaderMode) {

0 commit comments

Comments
 (0)