branch: externals/indent-bars
commit 4ad704782ac8d00d01c484b3aeb3397c95d92049
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>
Properly handle SWITCH-AFTER=0
In this case, STYLE2 should be used everywhere.
---
indent-bars.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index 1117f94ce9..a2cfc0b4e8 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -919,16 +919,18 @@ needed."
(put-text-property pos (1+ pos)
prop (funcall fun
(cond ((integerp switch-after)
- (cl-decf switch-after)
- (if (<= switch-after 0)
- (setq switch-after t))
- style2)
+ (prog1
+ (if (> switch-after 0)
style style2)
+ (cl-decf switch-after)
+ (if (<= switch-after 0)
+ (setq switch-after t))))
((eq switch-after t) style2)
(t style))
bar))
(cl-incf bar)
(cl-incf pos indent-bars-spacing))
- (if (and invent (<= bar nbars)) ; STILL bars to show: invent them
+ ;; STILL bars to show: invent them (if requested)
+ (if (and invent (<= bar nbars))
(put-text-property
end (1+ end) 'display
(concat (indent-bars--blank-string