Merge pull request #497 from sourcelair/issue-#488-tabstopwidth
Implement configurable tab stop width
This commit is contained in:
+4
-2
@@ -360,7 +360,8 @@ Terminal.defaults = {
|
||||
screenKeys: false,
|
||||
debug: false,
|
||||
cancelEvents: false,
|
||||
disableStdin: false
|
||||
disableStdin: false,
|
||||
tabStopWidth: 8
|
||||
// programFeatures: false,
|
||||
// focusKeys: false,
|
||||
};
|
||||
@@ -433,6 +434,7 @@ Terminal.prototype.setOption = function(key, value) {
|
||||
this.element.classList.toggle(`xterm-cursor-style-underline`, value === 'underline');
|
||||
this.element.classList.toggle(`xterm-cursor-style-bar`, value === 'bar');
|
||||
break;
|
||||
case 'tabStopWidth': this.setupStops(); break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2118,7 +2120,7 @@ Terminal.prototype.setupStops = function(i) {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
for (; i < this.cols; i += 8) {
|
||||
for (; i < this.cols; i += this.getOption('tabStopWidth')) {
|
||||
this.tabs[i] = true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user