emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/kotlin-mode c65c96a51a 086/162: fixes close bracket indent


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode c65c96a51a 086/162: fixes close bracket indentation
Date: Sat, 29 Jan 2022 08:25:25 -0500 (EST)

branch: elpa/kotlin-mode
commit c65c96a51a77bd685e87fc6da3530ae07595cda1
Author: Gregg Hernandez <gregg@lucidchart.com>
Commit: Gregg Hernandez <gregg@lucidchart.com>

    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 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]