From a7a7dc06f3f9a87f213d2ed77df3f65527a5b2f9 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 17 Feb 2011 10:37:35 +0100 Subject: [PATCH] disable auto indent for pasted code --- lib/ace/editor.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 957f8448..69d5f5d9 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -430,8 +430,10 @@ var Editor =function(renderer, session) { this.moveCursorToPosition(end); var lineState = this.bgTokenizer.getState(cursor.row); - // multi line insert - if (cursor.row !== end.row) { + // TODO disabled multiline auto indent + // possibly doing the indent before inserting the text + // if (cursor.row !== end.row) { + if (this.session.getDocument().isNewLine(text)) { var size = this.session.getTabSize(), minIndent = Number.MAX_VALUE;