mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
7 months ago
|
(function (addon) {
|
||
|
if (typeof window !== 'undefined' && 'Terminal' in window) {
|
||
|
addon(window.Terminal);
|
||
|
}
|
||
|
else if (typeof exports === 'object' && typeof module === 'object') {
|
||
|
module.exports = addon(require('../../Terminal').Terminal);
|
||
|
}
|
||
|
else if (typeof define === 'function') {
|
||
|
define(['../../xterm'], addon);
|
||
|
}
|
||
|
})(function (Terminal) {
|
||
|
Terminal.prototype.winptyCompatInit = function () {
|
||
|
var _this = this;
|
||
|
var isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].indexOf(navigator.platform) >= 0;
|
||
|
if (!isWindows) {
|
||
|
return;
|
||
|
}
|
||
|
this.on('lineFeed', function () {
|
||
|
var line = _this.buffer.lines.get(_this.buffer.ybase + _this.buffer.y - 1);
|
||
|
var lastChar = line[_this.cols - 1];
|
||
|
if (lastChar[3] !== 32) {
|
||
|
var nextLine = _this.buffer.lines.get(_this.buffer.ybase + _this.buffer.y);
|
||
|
nextLine.isWrapped = true;
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
});
|
||
|
|
||
|
//# sourceMappingURL=winptyCompat.js.map
|