diff --git a/lib/ace/elastic_tabstops.js b/lib/ace/elastic_tabstops.js index 85162cc5..c3fa0411 100644 --- a/lib/ace/elastic_tabstops.js +++ b/lib/ace/elastic_tabstops.js @@ -214,7 +214,7 @@ var ElasticTabstops = function(editor, session) { if (difference > 0) { // put the spaces after the tab and then delete the tab, so any insertion // points behave as expected - this.$session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference).join(" ") + "\t"); + this.$session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t"); this.$session.getDocument().removeInLine(row, it, it + 1); bias += difference;