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

    display: goto BEG prior to checking indentation depth
    
    This is necessary because font-lock puts point after the first
    non-blank character on the line, potentially changing the PPSS
    output (e.g. inside a string).
---
 indent-bars.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indent-bars.el b/indent-bars.el
index 8bb0da54aa..f04ef5fc0a 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1072,7 +1072,9 @@ font-lock properties."
 BEG and END should be on the same line.  STYLE, SWITCH-AFTER and
 STYLE2 are as in `indent-bars--draw-line'.  If STYLE is not
 passed, uses `indent-bars-style' for drawing."
-  (let ((n (indent-bars--current-indentation-depth)))
+  (let ((n (save-excursion
+            (goto-char beg)
+            (indent-bars--current-indentation-depth))))
     (when (> n 0) (indent-bars--draw-line style n beg end nil
                                          switch-after style2))))
 

Reply via email to