@xterm/xterm 5.4.0-beta.12 → 5.4.0-beta.13

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "5.4.0-beta.12",
4
+ "version": "5.4.0-beta.13",
5
5
  "main": "lib/xterm.js",
6
6
  "style": "css/xterm.css",
7
7
  "types": "typings/xterm.d.ts",
@@ -613,7 +613,14 @@ export class TextureAtlas implements ITextureAtlas {
613
613
  nextOffset = computeNextVariantOffset(xChRight - xChLeft, lineWidth, nextOffset);
614
614
  break;
615
615
  case UnderlineStyle.DASHED:
616
- this._tmpCtx.setLineDash([this._config.devicePixelRatio * 4, this._config.devicePixelRatio * 3]);
616
+ const lineRatio = 0.6;
617
+ const gapRatio = 0.3;
618
+ // End line ratio is approximately equal to 0.1
619
+ const xChWidth = xChRight - xChLeft;
620
+ const line = Math.floor(lineRatio * xChWidth);
621
+ const gap = Math.floor(gapRatio * xChWidth);
622
+ const end = xChWidth - line - gap;
623
+ this._tmpCtx.setLineDash([line, gap, end]);
617
624
  this._tmpCtx.moveTo(xChLeft, yTop);
618
625
  this._tmpCtx.lineTo(xChRight, yTop);
619
626
  break;