branch: elpa/swift-mode
commit c1f7ec22f72cfb6bd2ad27ef926938423bc21f23
Author: taku0 <mxxouy6x3m_git...@tatapa.org>
Commit: taku0 <mxxouy6x3m_git...@tatapa.org>

    Fix indentation of switch-case body
---
 swift-mode-indent.el              | 2 +-
 test/swift-files/statements.swift | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/swift-mode-indent.el b/swift-mode-indent.el
index db31be4..83224c7 100644
--- a/swift-mode-indent.el
+++ b/swift-mode-indent.el
@@ -488,7 +488,7 @@
       (goto-char (swift-mode:token:start previous-token))
       (swift-mode:find-and-align-with-parents
        swift-mode:statement-parent-tokens
-       swift-mode:basic-offset))
+       (- swift-mode:basic-offset swift-mode:switch-case-offset)))
 
      ;; Before ; on the same line
      ((and next-is-on-same-line (eq next-type '\;))
diff --git a/test/swift-files/statements.swift 
b/test/swift-files/statements.swift
index 93c921d..db63c1a 100644
--- a/test/swift-files/statements.swift
+++ b/test/swift-files/statements.swift
@@ -774,10 +774,10 @@ case let AAA
 
 switch foo {
   case foo:
-    foo() // swift-mode:test:known-bug
+    foo()
     foo()
   default:
-    foo() // swift-mode:test:known-bug
+    foo()
     foo()
 }
 

Reply via email to