minor tab handling changes
This commit is contained in:
parent
39433d0733
commit
6fa8ca3f64
2 changed files with 4 additions and 4 deletions
|
|
@ -40,8 +40,9 @@ ace.Document = function(text, mode) {
|
|||
this.getTabString = function() {
|
||||
if (this.getUseSoftTabs()) {
|
||||
return new Array(this.getTabSize()+1).join(" ");
|
||||
} else {
|
||||
return "\t";
|
||||
}
|
||||
return "\t";
|
||||
};
|
||||
|
||||
this.$useSoftTabs = false;
|
||||
|
|
|
|||
|
|
@ -280,9 +280,8 @@ ace.Editor = function(renderer, doc) {
|
|||
this.onTextInput = function(text) {
|
||||
var cursor = this.getCursorPosition();
|
||||
|
||||
if (this.doc.getUseSoftTabs()) {
|
||||
text = text.replace(/\t/g, this.doc.getTabString());
|
||||
}
|
||||
text = text.replace("\t", this.doc.getTabString());
|
||||
console.log(this.doc.getTabString().length);
|
||||
|
||||
if (!this.selection.isEmpty()) {
|
||||
var end = this.doc.replace(this.getSelectionRange(), text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue