Removed special handling of backspace and form feed

This commit is contained in:
Nathan Byrd 2023-09-22 01:18:38 +00:00
parent 79a3f4e1ce
commit 72a8546d74
1 changed files with 0 additions and 25 deletions

View File

@ -12,12 +12,9 @@ const _ = require('lodash');
exports.ANSIEscapeParser = ANSIEscapeParser; exports.ANSIEscapeParser = ANSIEscapeParser;
const BS = 0x08;
const TAB = 0x09; const TAB = 0x09;
const CR = 0x0d; const CR = 0x0d;
const LF = 0x0a; const LF = 0x0a;
const FF = 0x0c;
const BKSP = 0x08;
function ANSIEscapeParser(options) { function ANSIEscapeParser(options) {
var self = this; var self = this;
@ -114,14 +111,6 @@ function ANSIEscapeParser(options) {
charCode = text.charCodeAt(pos) & 0xff; // 8bit clean charCode = text.charCodeAt(pos) & 0xff; // 8bit clean
switch (charCode) { switch (charCode) {
case BS:
self.emit('literal', text.slice(start, pos + 1));
start = pos + 1;
self.column = Math.max(1, self.column - 1);
self.positionUpdated();
break;
case TAB: case TAB:
self.emit('literal', text.slice(start, pos + 1)); self.emit('literal', text.slice(start, pos + 1));
start = pos + 1; start = pos + 1;
@ -130,20 +119,6 @@ function ANSIEscapeParser(options) {
self.positionUpdated(); self.positionUpdated();
break; break;
case BKSP:
self.emit('literal', text.slice(start, pos + 1));
start = pos + 1;
self.column = Math.max(1, self.column - 1);
self.positionUpdated();
break;
case FF:
self.emit('literal', text.slice(start, pos + 1));
start = pos + 1;
self.clearScreen();
break;
case CR: case CR:
self.emit('literal', text.slice(start, pos + 1)); self.emit('literal', text.slice(start, pos + 1));
start = pos + 1; start = pos + 1;