branch: externals/indent-bars commit 269774df6d5030832d04c5cf067d7a3a2568a46f Author: JD Smith <93749+jdtsm...@users.noreply.github.com> Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>
Correct bar depth calculation corner case --- indent-bars.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indent-bars.el b/indent-bars.el index 20f0d2001b..68d48df3f5 100644 --- a/indent-bars.el +++ b/indent-bars.el @@ -630,9 +630,7 @@ font-lock properties." "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)) - (cond ((>= len indent-bars-spacing) (/ (1+ len) indent-bars-spacing)) - ((> len 0) 1) - (t 0))) + (if (>= len indent-bars-spacing) (1+ (/ (1+ len) indent-bars-spacing)) 0)) (defun indent-bars--blank-string (off nbars bar-from &optional width) "Return a blank string with bars displayed.