indentation fixes

This commit is contained in:
Fabian Jakobs 2010-09-17 09:51:12 +02:00
commit 773e4df04e
2 changed files with 7 additions and 9 deletions

View file

@ -530,11 +530,11 @@ ace.Document = function(text, mode) {
}; };
this.indentRows = function(range, indentString) { this.indentRows = function(range, indentString) {
for (var row=range.start.row; row<= range.end.row; row++) { for (var row=range.start.row; row<= range.end.row; row++) {
this.$insert({row: row, column:0}, indentString); this.$insert({row: row, column:0}, indentString);
} }
this.fireChangeEvent(range.start.row, range.end.row); this.fireChangeEvent(range.start.row, range.end.row);
return indentString.length; return indentString.length;
}; };
this.outdentRows = function(range, indentString) { this.outdentRows = function(range, indentString) {

View file

@ -237,12 +237,10 @@ ace.KeyBinding = function(element, editor) {
}; };
this["Tab"] = function() { this["Tab"] = function() {
if (this.selection.isMultiLine()) { if (this.selection.isMultiLine())
this.editor.blockIndent(); this.editor.blockIndent();
} else
else {
this.editor.onTextInput("\t"); this.editor.onTextInput("\t");
}
}; };
}).call(ace.KeyBinding.prototype); }).call(ace.KeyBinding.prototype);