fix b/B, ^/0, and h commands for visual mode. minor.
This commit is contained in:
+7
-5
@@ -214,7 +214,7 @@ function Terminal(options) {
|
|||||||
this.searchMode = false;
|
this.searchMode = false;
|
||||||
this.searchDown;
|
this.searchDown;
|
||||||
this.entry = '';
|
this.entry = '';
|
||||||
this.entryPrefix = '';
|
this.entryPrefix = 'Search: ';
|
||||||
this._real;
|
this._real;
|
||||||
this._selected;
|
this._selected;
|
||||||
this._textarea;
|
this._textarea;
|
||||||
@@ -4653,7 +4653,7 @@ Terminal.prototype.enterSearch = function(down) {
|
|||||||
this._real.preSearch = this.copyBuffer(this.lines);
|
this._real.preSearch = this.copyBuffer(this.lines);
|
||||||
this._real.preSearchX = this.x;
|
this._real.preSearchX = this.x;
|
||||||
this._real.preSearchY = this.y;
|
this._real.preSearchY = this.y;
|
||||||
this.entryPrefix = 'Search: ';
|
|
||||||
var bottom = this.ydisp + this.rows - 1;
|
var bottom = this.ydisp + this.rows - 1;
|
||||||
for (var i = 0; i < this.entryPrefix.length; i++) {
|
for (var i = 0; i < this.entryPrefix.length; i++) {
|
||||||
//this.lines[bottom][i][0] = (this.defAttr & ~0x1ff) | 4;
|
//this.lines[bottom][i][0] = (this.defAttr & ~0x1ff) | 4;
|
||||||
@@ -4663,8 +4663,10 @@ Terminal.prototype.enterSearch = function(down) {
|
|||||||
this.entryPrefix[i]
|
this.entryPrefix[i]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.y = this.rows - 1;
|
this.y = this.rows - 1;
|
||||||
this.x = this.entryPrefix.length;
|
this.x = this.entryPrefix.length;
|
||||||
|
|
||||||
this.refresh(this.rows - 1, this.rows - 1);
|
this.refresh(this.rows - 1, this.rows - 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5030,7 +5032,7 @@ Terminal.prototype.keySelect = function(ev, key) {
|
|||||||
this.x = 0;
|
this.x = 0;
|
||||||
}
|
}
|
||||||
if (this.visualMode) {
|
if (this.visualMode) {
|
||||||
this.selectText(this.x, x, this.ydisp + this.y, this.ydisp + this.y);
|
this.selectText(x, this.x, this.ydisp + this.y, this.ydisp + this.y);
|
||||||
} else {
|
} else {
|
||||||
this.refresh(this.y, this.y);
|
this.refresh(this.y, this.y);
|
||||||
}
|
}
|
||||||
@@ -5169,7 +5171,7 @@ Terminal.prototype.keySelect = function(ev, key) {
|
|||||||
this.scrollDisp(-this.ydisp + yb);
|
this.scrollDisp(-this.ydisp + yb);
|
||||||
|
|
||||||
if (this.visualMode) {
|
if (this.visualMode) {
|
||||||
this.selectText(this.x, ox, this.ydisp + this.y, oy + oyd);
|
this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5241,7 +5243,7 @@ Terminal.prototype.keySelect = function(ev, key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.visualMode) {
|
if (this.visualMode) {
|
||||||
this.selectText(this.x, ox, this.ydisp + this.y, this.ydisp + this.y);
|
this.selectText(ox, this.x, this.ydisp + this.y, this.ydisp + this.y);
|
||||||
} else {
|
} else {
|
||||||
this.refresh(this.y, this.y);
|
this.refresh(this.y, this.y);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user