@xterm/xterm 6.1.0-beta.200 → 6.1.0-beta.201

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": "6.1.0-beta.200",
4
+ "version": "6.1.0-beta.201",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -119,5 +119,5 @@
119
119
  "ws": "^8.2.3",
120
120
  "xterm-benchmark": "^0.3.1"
121
121
  },
122
- "commit": "32553b413592d236a386b905e8331444df1f0364"
122
+ "commit": "7fe89a1c1a9139e752d92a75da876823882a7a45"
123
123
  }
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.200';
9
+ export const XTERM_VERSION = '6.1.0-beta.201';
@@ -462,8 +462,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
462
462
  this._oscParser.reset();
463
463
  this._dcsParser.reset();
464
464
  this._apcParser.reset();
465
- this._params.reset();
466
- this._params.addParam(0); // ZDM
465
+ this._params.resetZdm();
467
466
  this._collect = 0;
468
467
  this.precedingJoinState = 0;
469
468
  // abort pending continuation from async handler
@@ -612,8 +611,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
612
611
  return handlerResult;
613
612
  }
614
613
  if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;
615
- this._params.reset();
616
- this._params.addParam(0); // ZDM
614
+ this._params.resetZdm();
617
615
  this._collect = 0;
618
616
  break;
619
617
  case ParserStackType.OSC:
@@ -623,8 +621,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
623
621
  return handlerResult;
624
622
  }
625
623
  if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;
626
- this._params.reset();
627
- this._params.addParam(0); // ZDM
624
+ this._params.resetZdm();
628
625
  this._collect = 0;
629
626
  break;
630
627
  case ParserStackType.APC:
@@ -634,8 +631,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
634
631
  return handlerResult;
635
632
  }
636
633
  if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;
637
- this._params.reset();
638
- this._params.addParam(0); // ZDM
634
+ this._params.resetZdm();
639
635
  this._collect = 0;
640
636
  break;
641
637
  }
@@ -666,8 +662,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
666
662
  && this.currentState < ParserState.OSC_STRING
667
663
  && i + 2 < length && data[i + 1] === 0x5b
668
664
  ) {
669
- this._params.reset();
670
- this._params.addParam(0); // ZDM
665
+ this._params.resetZdm();
671
666
  this._collect = 0;
672
667
  let k = i + 2;
673
668
  let ch = data[k];
@@ -817,8 +812,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
817
812
  this.precedingJoinState = 0;
818
813
  break;
819
814
  case ParserAction.CLEAR:
820
- this._params.reset();
821
- this._params.addParam(0); // ZDM
815
+ this._params.resetZdm();
822
816
  this._collect = 0;
823
817
  break;
824
818
  case ParserAction.DCS_HOOK:
@@ -842,8 +836,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
842
836
  return handlerResult;
843
837
  }
844
838
  if (code === 0x1b) transition |= ParserState.ESCAPE;
845
- this._params.reset();
846
- this._params.addParam(0); // ZDM
839
+ this._params.resetZdm();
847
840
  this._collect = 0;
848
841
  this.precedingJoinState = 0;
849
842
  break;
@@ -867,8 +860,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
867
860
  return handlerResult;
868
861
  }
869
862
  if (code === 0x1b) transition |= ParserState.ESCAPE;
870
- this._params.reset();
871
- this._params.addParam(0); // ZDM
863
+ this._params.resetZdm();
872
864
  this._collect = 0;
873
865
  this.precedingJoinState = 0;
874
866
  break;
@@ -892,8 +884,7 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
892
884
  return handlerResult;
893
885
  }
894
886
  if (code === 0x1b) transition |= ParserState.ESCAPE;
895
- this._params.reset();
896
- this._params.addParam(0); // ZDM
887
+ this._params.resetZdm();
897
888
  this._collect = 0;
898
889
  this.precedingJoinState = 0;
899
890
  break;
@@ -129,6 +129,19 @@ export class Params implements IParams {
129
129
  this._digitIsSub = false;
130
130
  }
131
131
 
132
+ /**
133
+ * Reset and add 0 as first param (ZDM).
134
+ */
135
+ public resetZdm(): void {
136
+ this.length = 1;
137
+ this._subParamsLength = 0;
138
+ this._rejectDigits = false;
139
+ this._rejectSubDigits = false;
140
+ this._digitIsSub = false;
141
+ this._subParamsIdx[0] = 0;
142
+ this.params[0] = 0;
143
+ }
144
+
132
145
  /**
133
146
  * Add a parameter value.
134
147
  * `Params` only stores up to `maxLength` parameters, any later
@@ -32,6 +32,7 @@ export interface IParams {
32
32
  clone(): IParams;
33
33
  toArray(): ParamsArray;
34
34
  reset(): void;
35
+ resetZdm(): void;
35
36
  addParam(value: number): void;
36
37
  addSubParam(value: number): void;
37
38
  hasSubParams(idx: number): boolean;