mirror of
https://git.proxmox.com/git/mirror_xterm.js
synced 2025-10-04 15:37:19 +00:00
Merge pull request #380 from Tyriar/378_handle_keypress_scroll
Scroll to bottom whenever handler is called
This commit is contained in:
commit
64f80f8623
@ -2458,11 +2458,6 @@ Terminal.prototype.keyDown = function(ev) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scroll down to prompt, whenever the user presses a key.
|
|
||||||
if (this.ybase !== this.ydisp) {
|
|
||||||
this.scrollToBottom();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.emit('keydown', ev);
|
this.emit('keydown', ev);
|
||||||
this.emit('key', result.key, ev);
|
this.emit('key', result.key, ev);
|
||||||
this.showCursor();
|
this.showCursor();
|
||||||
@ -3153,6 +3148,10 @@ Terminal.prototype.is = function(term) {
|
|||||||
* @param {string} data The data to populate in the event.
|
* @param {string} data The data to populate in the event.
|
||||||
*/
|
*/
|
||||||
Terminal.prototype.handler = function(data) {
|
Terminal.prototype.handler = function(data) {
|
||||||
|
// Input is being sent to the terminal, the terminal should focus the prompt.
|
||||||
|
if (this.ybase !== this.ydisp) {
|
||||||
|
this.scrollToBottom();
|
||||||
|
}
|
||||||
this.emit('data', data);
|
this.emit('data', data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user