mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
merge ParserTerminal with InputHandler
- quick'n dirty merge of classes - ParserTerminal is subclass of InputHandler - basic fallback handlers implemented - test regressions due to multiple changes in EscapeSequenceParser - runtime down to 2.3s - TODO: fix tests, implement DCS functions, full merge of classes
This commit is contained in:
+190
-134
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -4,7 +4,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CharData, IInputHandler, IInputHandlingTerminal } from './Types';
|
||||
import { CharData, IInputHandler } from './Types';
|
||||
import { C0 } from './EscapeSequences';
|
||||
import { DEFAULT_CHARSET } from './Charsets';
|
||||
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX } from './Buffer';
|
||||
@@ -19,7 +19,7 @@ import { wcwidth } from './CharWidth';
|
||||
* each function's header comment.
|
||||
*/
|
||||
export class InputHandler implements IInputHandler {
|
||||
constructor(private _terminal: IInputHandlingTerminal) { }
|
||||
constructor(protected _terminal: any) { }
|
||||
|
||||
public addChar(char: string, code: number): void {
|
||||
// if (char >= ' ') {
|
||||
|
||||
+1
-1
@@ -334,7 +334,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
|
||||
this._inputHandler = new InputHandler(this);
|
||||
// this._parser = new Parser(this._inputHandler, this);
|
||||
this._newParser = new ParserTerminal(this._inputHandler, this);
|
||||
this._newParser = new ParserTerminal(this);
|
||||
// Reuse renderer if the Terminal is being recreated via a reset call.
|
||||
this.renderer = this.renderer || null;
|
||||
this.selectionManager = this.selectionManager || null;
|
||||
|
||||
Reference in New Issue
Block a user