fix +13786 tab sometimes deletes character before

pull/313/head
nightwing 2016-05-29 02:18:42 +04:00
rodzic 402b79b640
commit de38faaa74
2 zmienionych plików z 7 dodań i 1 usunięć

2
node_modules/ace/lib/ace/editor.js wygenerowano vendored
Wyświetl plik

@ -1486,7 +1486,7 @@ var Editor = function(renderer, session) {
var indentString = lang.stringRepeat(" ", count);
} else {
var count = column % size;
while (line[range.start.column] == " " && count) {
while (line[range.start.column - 1] == " " && count) {
range.start.column--;
count--;
}

Wyświetl plik

@ -124,6 +124,12 @@ module.exports = {
var range = editor.getSelectionRange();
assert.position(range.start, 1, 7);
assert.position(range.end, 2, 7);
session.setValue(" x");
session.setOption("useSoftTabs", false);
editor.selection.moveTo(0, 3);
editor.indent();
assert.equal("\tx", session.toString());
},
"test: indent selected lines" : function() {