Skip to content

Commit b6d0351

Browse files
committed
Fix indentation of switch
1 parent 78cea9d commit b6d0351

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

swift-mode-lexer.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ That is supertype declaration or type declaration of let or var."
456456
;; FIXME: mutual dependency
457457
(swift-mode:token:text
458458
(swift-mode:backward-sexps-until
459-
'(implicit-\; \; { \( \[ "case" "default" 'case-:)))
459+
'(implicit-\; \; { \( \[ "case" "default" case-:)))
460460
'("case" "default"))))
461461

462462
(defun swift-mode:anonyous-parameter-in-p ()

test/swift-files/statements.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,12 @@ case 2:
904904
bar()
905905
}
906906

907+
switch foo {
908+
case 1:
909+
var x: Int = 1
910+
var y: Int = 2
911+
}
912+
907913
// swift-mode:test:eval (setq-local swift-mode:switch-case-offset 2)
908914

909915
switch foo {

0 commit comments

Comments
 (0)