branch: elpa/kotlin-mode
commit c65c96a51a77bd685e87fc6da3530ae07595cda1
Author: Gregg Hernandez <[email protected]>
Commit: Gregg Hernandez <[email protected]>
fixes close bracket indentation
---
kotlin-mode.el | 4 +++-
test/sample.kt | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/kotlin-mode.el b/kotlin-mode.el
index 8ad2f6d9af..4f67c027b3 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -244,9 +244,11 @@
(if (< cur-indent 0)
(setq cur-indent 0))))
- ((looking-at "^[ \t]*}")
+ ((looking-at "^[ \t]*}")
(save-excursion
(forward-line -1)
+ (while (and (looking-at "^[ \t]*\\.") (not (bobp)))
+ (forward-line -1))
(setq cur-indent (- (current-indentation) kotlin-tab-width)))
(if (< cur-indent 0)
(setq cur-indent 0)))
diff --git a/test/sample.kt b/test/sample.kt
index b7bf044c76..1768f0142e 100644
--- a/test/sample.kt
+++ b/test/sample.kt
@@ -113,7 +113,7 @@ fun f() {
things.f()
.g()
.h()
- }
+}
data class Customer(val name: String, val email: String)
val positives = list.filter { x -> x > 0 }