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

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

[elpa] externals/indent-bars 51f12b7c06 215/431: Correct depth calculati


From: ELPA Syncer
Subject: [elpa] externals/indent-bars 51f12b7c06 215/431: Correct depth calculation (again)
Date: Mon, 16 Sep 2024 12:59:30 -0400 (EDT)

branch: externals/indent-bars
commit 51f12b7c06fc4b72309d4acf4b67ef3a4f5b50d4
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    Correct depth calculation (again)
---
 indent-bars.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indent-bars.el b/indent-bars.el
index 45a036aa68..59c3ed0a34 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -773,8 +773,9 @@ inheritance of the plist is handled.  If style is the symbol
 (defsubst indent-bars--depth (len)
   "Number of possible bars for initial blank string of length LEN.
 Note that the first bar is expected at `indent-bars-starting-column'."
-  (setq len (- len indent-bars--offset))
-  (if (>= len indent-bars-spacing) (1+ (/ (1+ len) indent-bars-spacing)) 0))
+  (if (> len indent-bars--offset)
+      (1+ (/ (- len indent-bars--offset 1) indent-bars-spacing))
+    0))
 
 (defvar indent-bars--update-depth-function nil)
 (defun indent-bars--current-indentation-depth (&optional on-bar)



reply via email to

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