mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Wrap all characters temporarily in spans to force fixed with
Fixes #467
This commit is contained in:
+9
-2
@@ -283,8 +283,12 @@ export class Renderer {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Consider performance implications of not pulling these from the pool
|
||||
if (ch_width === 2) {
|
||||
out += '<span class="xterm-wide-char">';
|
||||
innerHTML += '<span class="xterm-wide-char">';
|
||||
} else {
|
||||
// TODO: Only wrap unicode characters that may vary in width
|
||||
innerHTML += '<span class="xterm-normal-char">';
|
||||
}
|
||||
switch (ch) {
|
||||
case '&':
|
||||
@@ -310,7 +314,10 @@ export class Renderer {
|
||||
break;
|
||||
}
|
||||
if (ch_width === 2) {
|
||||
out += '</span>';
|
||||
innerHTML += '</span>';
|
||||
} else {
|
||||
// TODO: Only wrap unicode characters that may vary in width
|
||||
innerHTML += '</span>';
|
||||
}
|
||||
|
||||
attr = data;
|
||||
|
||||
+2
-1
@@ -153,7 +153,8 @@
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.terminal .xterm-wide-char {
|
||||
.terminal .xterm-wide-char,
|
||||
.terminal .xterm-normal-char {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -760,7 +760,9 @@ Terminal.loadAddon = function(addon, callback) {
|
||||
* character width has been changed.
|
||||
*/
|
||||
Terminal.prototype.updateCharSizeCSS = function() {
|
||||
this.charSizeStyleElement.textContent = '.xterm-wide-char{width:' + (this.charMeasure.width * 2) + 'px;}';
|
||||
this.charSizeStyleElement.textContent =
|
||||
'.xterm-wide-char{width:' + (this.charMeasure.width * 2) + 'px;}' +
|
||||
'.xterm-normal-char{width:' + this.charMeasure.width + 'px;}'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user