[email protected] 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/dist/ghostty-web.js b/dist/ghostty-web.js
  2. index 7c9d64a617bbeb29d757a1acd54686e582868313..2d61098cdb77fa66cbb162897c5590f35cfcf791 100644
  3. --- a/dist/ghostty-web.js
  4. +++ b/dist/ghostty-web.js
  5. @@ -1285,7 +1285,7 @@ const e = class H {
  6. continue;
  7. }
  8. const C = g.getCodepoint();
  9. - C === 0 || C < 32 ? B.push(" ") : B.push(String.fromCodePoint(C));
  10. + C === 0 || C < 32 || C > 1114111 || (C >= 55296 && C <= 57343) ? B.push(" ") : B.push(String.fromCodePoint(C));
  11. }
  12. return B.join("");
  13. }
  14. @@ -1484,7 +1484,7 @@ class _ {
  15. return;
  16. let J = "";
  17. A.flags & U.ITALIC && (J += "italic "), A.flags & U.BOLD && (J += "bold "), this.ctx.font = `${J}${this.fontSize}px ${this.fontFamily}`, this.ctx.fillStyle = this.rgbToCSS(w, o, i), A.flags & U.FAINT && (this.ctx.globalAlpha = 0.5);
  18. - const s = g, F = C + this.metrics.baseline, a = String.fromCodePoint(A.codepoint || 32);
  19. + const s = g, F = C + this.metrics.baseline, a = (A.codepoint === 0 || A.codepoint == null || A.codepoint < 0 || A.codepoint > 1114111 || (A.codepoint >= 55296 && A.codepoint <= 57343)) ? " " : String.fromCodePoint(A.codepoint);
  20. if (this.ctx.fillText(a, s, F), A.flags & U.FAINT && (this.ctx.globalAlpha = 1), A.flags & U.UNDERLINE) {
  21. const N = C + this.metrics.baseline + 2;
  22. this.ctx.strokeStyle = this.ctx.fillStyle, this.ctx.lineWidth = 1, this.ctx.beginPath(), this.ctx.moveTo(g, N), this.ctx.lineTo(g + I, N), this.ctx.stroke();
  23. @@ -1730,7 +1730,7 @@ const L = class R {
  24. let G = "";
  25. for (let J = M; J <= k; J++) {
  26. const s = o[J];
  27. - if (s && s.codepoint !== 0) {
  28. + if (s && s.codepoint !== 0 && s.codepoint <= 1114111 && !(s.codepoint >= 55296 && s.codepoint <= 57343)) {
  29. const F = String.fromCodePoint(s.codepoint);
  30. G += F, F.trim() && (i = G.length);
  31. } else
  32. @@ -1995,7 +1995,7 @@ const L = class R {
  33. if (!Q)
  34. return null;
  35. const g = (w) => {
  36. - if (!w || w.codepoint === 0)
  37. + if (!w || w.codepoint === 0 || w.codepoint > 1114111 || (w.codepoint >= 55296 && w.codepoint <= 57343))
  38. return !1;
  39. const o = String.fromCodePoint(w.codepoint);
  40. return /[\w-]/.test(o);