From d3b3715384c739e422b87f7a0e79b65d6e7aef97 Mon Sep 17 00:00:00 2001 From: mattpass Date: Sun, 4 Oct 2020 08:56:25 +0100 Subject: [PATCH] Auto-indent lines on move line(s) should be in same operation --- assets/js/icecoder.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js index 5c89694..fc78989 100644 --- a/assets/js/icecoder.js +++ b/assets/js/icecoder.js @@ -1166,11 +1166,10 @@ var ICEcoder = { {line: lineStart.line + ("up" === dir ? -1 : 1), ch: lineStart.ch}, {line: lineEnd.line + ("up" === dir ? -1 : 1), ch: lineEnd.ch} ); + // Auto-indent the lines we're moving (but not the swapped line) + ICEcoder.autoIndentLines(lineStart.line - ("up" === dir ? 1 : -1), lineEnd.line + ("up" === dir ? -1 : 1)); }) } - - // Auto-indent the lines we're moving (but not the swapped line) - this.autoIndentLines(lineStart.line - ("up" === dir ? 1 : -1), lineEnd.line + ("up" === dir ? -1 : 1)); }, // Highlight specified line