mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-25 02:08:59 +00:00
comments. misc.
This commit is contained in:
parent
f460c99015
commit
51bc7c388c
10
lib/tput.js
10
lib/tput.js
@ -47,6 +47,7 @@ function Tput(options) {
|
|||||||
this.compileTerminfo();
|
this.compileTerminfo();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// if (e.message === 'Terminal not found.') {
|
||||||
this.term = 'vt102';
|
this.term = 'vt102';
|
||||||
this.compileTermcap();
|
this.compileTermcap();
|
||||||
}
|
}
|
||||||
@ -178,7 +179,9 @@ Tput.prototype.parseTerminfo = function(data) {
|
|||||||
|
|
||||||
while (data[j]) j++;
|
while (data[j]) j++;
|
||||||
|
|
||||||
if (s >= data.length || j > data.length) {
|
// assert.ok(j < data.length);
|
||||||
|
if (j >= data.length) {
|
||||||
|
// throw new Error('Error parsing terminfo.');
|
||||||
delete info.strings[key];
|
delete info.strings[key];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -278,7 +281,6 @@ Tput.prototype.parseExtended = function(data) {
|
|||||||
|
|
||||||
// Booleans Section
|
// Booleans Section
|
||||||
// One byte for each flag
|
// One byte for each flag
|
||||||
// Same order as <term.h>
|
|
||||||
var _bools = [];
|
var _bools = [];
|
||||||
l = i + h.boolCount;
|
l = i + h.boolCount;
|
||||||
for (; i < l; i++) {
|
for (; i < l; i++) {
|
||||||
@ -331,7 +333,9 @@ Tput.prototype.parseExtended = function(data) {
|
|||||||
|
|
||||||
while (data[j]) j++;
|
while (data[j]) j++;
|
||||||
|
|
||||||
if (s >= data.length || j > data.length) {
|
// assert.ok(j < data.length);
|
||||||
|
if (j >= data.length) {
|
||||||
|
// throw new Error('Error parsing terminfo.');
|
||||||
_strings[k] = '';
|
_strings[k] = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user