convert double equals to triple equals.

This commit is contained in:
Christopher Jeffrey
2013-08-16 20:13:31 -05:00
parent c5e8a7ab62
commit ee7498dff5
+11 -11
View File
@@ -2801,7 +2801,7 @@ Terminal.prototype.keySelect = function(ev, key) {
x++; x++;
} }
if (x >= this.cols) x = this.cols - 1; if (x >= this.cols) x = this.cols - 1;
if (x == this.cols - 1 && line[x][1] <= ' ') { if (x === this.cols - 1 && line[x][1] <= ' ') {
x = 0; x = 0;
if (++y >= this.rows) { if (++y >= this.rows) {
y--; y--;
@@ -2849,7 +2849,7 @@ Terminal.prototype.keySelect = function(ev, key) {
x--; x--;
} }
if (x < 0) x = 0; if (x < 0) x = 0;
if (x == 0 && (l[x][1] <= ' ' || !saw_space)) { if (x === 0 && (l[x][1] <= ' ' || !saw_space)) {
x = this.cols - 1; x = this.cols - 1;
if (--y < 0) { if (--y < 0) {
y++; y++;
@@ -2898,7 +2898,7 @@ Terminal.prototype.keySelect = function(ev, key) {
x++; x++;
} }
if (x >= this.cols) x = this.cols - 1; if (x >= this.cols) x = this.cols - 1;
if (x == this.cols - 1 && l[x][1] <= ' ') { if (x === this.cols - 1 && l[x][1] <= ' ') {
x = 0; x = 0;
if (++y >= this.rows) { if (++y >= this.rows) {
y--; y--;
@@ -3036,17 +3036,17 @@ Terminal.prototype.keySelect = function(ev, key) {
for (i = 0; i < this.cols; i++) { for (i = 0; i < this.cols; i++) {
if (line[i][1] > ' ') { if (line[i][1] > ' ') {
if (first_is_space == -1) { if (first_is_space === -1) {
first_is_space = 0; first_is_space = 0;
} }
saw_full = true; saw_full = true;
break; break;
} else if (i == this.cols - 1) { } else if (i === this.cols - 1) {
if (first_is_space == -1) { if (first_is_space === -1) {
first_is_space = 1; first_is_space = 1;
} else if (first_is_space == 0) { } else if (first_is_space === 0) {
found = true; found = true;
} else if (first_is_space == 1) { } else if (first_is_space === 1) {
if (saw_full) found = true; if (saw_full) found = true;
} }
break; break;
@@ -3219,9 +3219,9 @@ Terminal.prototype.keySearch = function(ev, key) {
while (x < this.cols) { while (x < this.cols) {
for (i = 0; i < entry.length; i++) { for (i = 0; i < entry.length; i++) {
if (x + i >= this.cols) break; if (x + i >= this.cols) break;
if (line[x + i][1] != entry[i]) { if (line[x + i][1] !== entry[i]) {
break; break;
} else if (line[x + i][1] == entry[i] && i == entry.length - 1) { } else if (line[x + i][1] === entry[i] && i === entry.length - 1) {
found = true; found = true;
break; break;
} }
@@ -3283,7 +3283,7 @@ Terminal.prototype.keySearch = function(ev, key) {
} }
if (key === '\b' || key === '\x7f') { if (key === '\b' || key === '\x7f') {
if (this.entry.length == 0) return; if (this.entry.length === 0) return;
var bottom = this.ydisp + this.rows - 1; var bottom = this.ydisp + this.rows - 1;
this.entry = this.entry.slice(0, -1); this.entry = this.entry.slice(0, -1);
var i = this.entryPrefix.length + this.entry.length; var i = this.entryPrefix.length + this.entry.length;