branch: externals/indent-bars
commit 2b6d25a083d1a6111c217d178619b5d039a6a2c8
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>

    update current indentation only if depth decreases
---
 indent-bars.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indent-bars.el b/indent-bars.el
index 266c0946e5..c85de3757e 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -929,8 +929,9 @@ and can return an updated depth."
             (sl (and indent-bars-no-descend-lists (nth 1 ppss))))
        (when (setq ppss-ind (if (and ss sl) (max ss sl) (or ss sl)))
          (goto-char ppss-ind)
-         (setq c (current-indentation)
-               d (min d (1+ (indent-bars--depth c)))))
+         (let* ((cnew (current-indentation))
+                (dnew (1+ (indent-bars--depth cnew))))
+           (when (< dnew d) (setq d dnew c cnew))))
        (goto-char p)))
     (when (and indent-bars--update-depth-function (not ppss-ind))
       (setq d (funcall indent-bars--update-depth-function d)))

Reply via email to