mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-10 19:16:20 +00:00
clean up old code.
This commit is contained in:
parent
363bc44caa
commit
d5f3874105
13
lib/tput.js
13
lib/tput.js
@ -579,16 +579,12 @@ Tput.prototype._compile = function(val, key) {
|
||||
}
|
||||
}
|
||||
|
||||
function read(regex, buf) {
|
||||
function read(regex) {
|
||||
cap = regex.exec(val);
|
||||
if (!cap) return;
|
||||
val = val.substring(cap[0].length);
|
||||
ch = op = i = v = cap[1];
|
||||
//if (buf == null) {
|
||||
clear();
|
||||
//} else if (typeof buf === 'string') {
|
||||
//buff += buf;
|
||||
//}
|
||||
clear();
|
||||
return cap;
|
||||
}
|
||||
|
||||
@ -597,12 +593,10 @@ Tput.prototype._compile = function(val, key) {
|
||||
code = code.slice(0, -1);
|
||||
}
|
||||
code += c;
|
||||
// code += ';' + c;
|
||||
}
|
||||
|
||||
function expr(c) {
|
||||
code += c + ',';
|
||||
// code += '(' + c + '),';
|
||||
}
|
||||
|
||||
function echo(c) {
|
||||
@ -610,7 +604,6 @@ Tput.prototype._compile = function(val, key) {
|
||||
}
|
||||
|
||||
function print(c) {
|
||||
//buff += c;
|
||||
echo('"' + c + '"');
|
||||
}
|
||||
|
||||
@ -624,7 +617,7 @@ Tput.prototype._compile = function(val, key) {
|
||||
|
||||
while (val) {
|
||||
// '\e' -> ^[
|
||||
if (read(/^\\e/i)) { // , '\x1b')) {
|
||||
if (read(/^\\e/i)) {
|
||||
print('\\x1b');
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user