branch: externals/indent-bars
commit 57757f63a4417bddc225b6cc0d08a51364c520d3
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

    Minor comment improvements
---
 indent-bars-ts.el |  4 ++--
 indent-bars.el    | 11 +++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/indent-bars-ts.el b/indent-bars-ts.el
index 6834a7687c..bc7a9c32fd 100644
--- a/indent-bars-ts.el
+++ b/indent-bars-ts.el
@@ -395,7 +395,7 @@ font-lock is pending."
 (defvar indent-bars--ts-mode)
 (defun indent-bars-ts--context-fontify (fun)
   "Wrap FUN to keep track of context fontification.
-Added as `:around' advice to `jit-lock-context-unfontify-pos'.
+Added as `:around' advice to `jit-lock-context-fontify'.
 Applies `indent-bars-font-lock-pending' property to the newly
 invalidated text."
    (let (orig)
@@ -471,7 +471,7 @@ due to edits or contextual fontification."
   (setq-local indent-bars--font-lock-inhibit 
#'indent-bars-ts--font-lock-inhibit
              font-lock-fontify-buffer-function #'indent-bars-ts--fontify-buffer
              font-lock-flush-function #'indent-bars-ts--flush)
-  ;; We must mark the fontified=nil from after-change and contextual
+  ;; We must mark the fontified=nil regions of jit-lock, both after-change and 
contextual
   (add-hook 'jit-lock-after-change-extend-region-functions
            #'indent-bars-ts--mark-change 96 t)
   (when (eq jit-lock-contextually t)
diff --git a/indent-bars.el b/indent-bars.el
index afccfdcf43..e8ca3ce511 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -957,7 +957,7 @@ Note that the first bar is expected at 
`indent-bars-starting-column'."
       (1+ (/ (- len indent-bars--offset 1) indent-bars-spacing))
     0))
 
-(defun indent-bars--context-depth ()
+(defun indent-bars--context-indentation ()
   "Return the maximum `current-indentation' around current line.
 Skips any fully blank lines."
   (let ((prior-indent
@@ -1022,7 +1022,7 @@ and can return an updated depth."
     (when (and indent-bars--update-depth-function (not ppss-ind))
       (setq d (funcall indent-bars--update-depth-function d)))
     (when (and (eq on-bar 'context)
-              (< (indent-bars--context-depth) (+ c indent-bars-spacing)))
+              (< (indent-bars--context-indentation) (+ c indent-bars-spacing)))
       (setq on-bar nil))
     (if (and on-bar (= c (+ indent-bars--offset (* d indent-bars-spacing))))
        (1+ d) d)))
@@ -1136,7 +1136,7 @@ needed."
        ;; STILL bars to show: invent them (if requested)
        (when (and invent (<= bar nbars))
          (add-text-properties
-          end (1+ end)
+          end (1+ end) ; atop the final newline
           `(indent-bars-display
             ,(concat (indent-bars--blank-string
                       style (- pos end) (- nbars bar -1) bar nil
@@ -1166,7 +1166,7 @@ passed, uses `indent-bars-style' for drawing."
                                         switch-after style2))))
 
 (defun indent-bars--display-blank-lines (beg end &optional style switch-after 
style2)
-  "Display the appropriate bars over the blank-only lines from BEG..END.
+  "Display appropriate bars over the blank-only lines from BEG..END.
 Only called if `indent-bars-display-on-blank-lines' is non-nil.
 To be called on complete multi-line blank line regions.
 
@@ -1204,8 +1204,7 @@ not indicated, even if they otherwise would be."
   "Extend the region START..END.
 If `indent-bars-display-on-blank-lines' is non-nil, this extends
 it to include complete contiguous stretches of blank lines and
-always starts and ends on the beginning of a line.  Uses and sets
-the dynamic variables `jit-lock-start' and `jit-lock-end'."
+always starts and ends on the beginning of a line."
   (save-excursion
     (let ((chars " \t\n"))
       (goto-char start)

Reply via email to