OC-6187 Formatter: 'Smart tab' option doesn't convert spaces to tabs correctly
authorAlexey Utkin <alexey.utkin@jetbrains.com>
Tue, 11 Aug 2015 08:54:47 +0000 (11:54 +0300)
committerAlexey Utkin <alexey.utkin@jetbrains.com>
Tue, 11 Aug 2015 08:59:53 +0000 (11:59 +0300)
platform/lang-impl/src/com/intellij/formatting/CoreFormatterUtil.java

index b9b8bbf3eb8398c0f6943b7ddf3db30c8738d05f..1af833a35194068137cba2a124aa8911afee8fac 100644 (file)
@@ -248,7 +248,7 @@ public class CoreFormatterUtil {
     }
     if (indent.getType() == Indent.Type.LABEL) return new IndentData(options.LABEL_INDENT_SIZE);
     if (indent.getType() == Indent.Type.NONE) return new IndentData(0);
-    if (indent.getType() == Indent.Type.SPACES) return new IndentData(0, indent.getSpaces());
+    if (indent.getType() == Indent.Type.SPACES) return new IndentData(indent.getSpaces(), 0);
     return new IndentData(options.INDENT_SIZE);
   }