@xterm/addon-ligatures 0.10.0-beta.68 → 0.10.0-beta.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xterm/addon-ligatures",
|
|
3
|
-
"version": "0.10.0-beta.
|
|
3
|
+
"version": "0.10.0-beta.69",
|
|
4
4
|
"description": "Add support for programming ligatures to xterm.js",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "The xterm.js authors",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"yauzl": "^2.10.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@xterm/xterm": "^5.6.0-beta.
|
|
46
|
+
"@xterm/xterm": "^5.6.0-beta.69"
|
|
47
47
|
},
|
|
48
|
-
"commit": "
|
|
48
|
+
"commit": "b3f3cf1216ee5cac7671d75b684439f79423c48e"
|
|
49
49
|
}
|
package/src/LigaturesAddon.ts
CHANGED
|
@@ -31,8 +31,12 @@ export class LigaturesAddon implements ITerminalAddon , ILigaturesApi {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
public activate(terminal: Terminal): void {
|
|
34
|
+
if (!terminal.element) {
|
|
35
|
+
throw new Error('Cannot activate LigaturesAddon before open is called');
|
|
36
|
+
}
|
|
34
37
|
this._terminal = terminal;
|
|
35
38
|
this._characterJoinerId = enableLigatures(terminal, this._fallbackLigatures);
|
|
39
|
+
terminal.element.style.fontFeatureSettings = '"liga" on, "calt" on';
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
public dispose(): void {
|
|
@@ -40,5 +44,8 @@ export class LigaturesAddon implements ITerminalAddon , ILigaturesApi {
|
|
|
40
44
|
this._terminal?.deregisterCharacterJoiner(this._characterJoinerId);
|
|
41
45
|
this._characterJoinerId = undefined;
|
|
42
46
|
}
|
|
47
|
+
if (this._terminal?.element) {
|
|
48
|
+
this._terminal.element.style.fontFeatureSettings = '';
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
51
|
}
|