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

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

[elpa] externals/indent-bars 1a5f016740 032/431: blank line bars: correc


From: ELPA Syncer
Subject: [elpa] externals/indent-bars 1a5f016740 032/431: blank line bars: correctly mark final line bars
Date: Mon, 16 Sep 2024 12:59:10 -0400 (EDT)

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

    blank line bars: correctly mark final line bars
---
 indent-bars.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/indent-bars.el b/indent-bars.el
index 4673f71094..2625fe92ad 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -480,8 +480,7 @@ font-lock properties."
   "Shift number NUM of W bits up by N bits, carrying around to the low bits.
 N should be strictly less than W and the returned value will fit
 within W bits."
-  (logand (indent-bars--block w)
-         (logior (ash num n) (ash num (- n w)))))
+  (logand (indent-bars--block w) (logior (ash num n) (ash num (- n w)))))
 
 (defun indent-bars--row-data (w pad rot width-frac)
   "Calculate stipple row data to fit in character of width W.
@@ -635,12 +634,14 @@ OBJ, otherwise in the buffer."
        (unless (bolp) (beginning-of-line 2)) ; spaces at end don't count
        (if (< (point) font-lock-beg)
            (setq changed t font-lock-beg (point)))))
-    (goto-char font-lock-end)
-    (if (> (skip-chars-forward chars) 0)
-       (setq changed t font-lock-end (point)))
+    (unless (eq font-lock-end (point-max))
+      (goto-char (1+ font-lock-end))
+      (when (> (skip-chars-forward chars) 0)
+       ;; (unless (eolp) (beginning-of-line 0))
+       (if (> (point) font-lock-end)
+           (setq changed t font-lock-end (point)))))
     changed))
 
-
 (defun indent-bars--handle-blank-lines ()
   "Display the appropriate bars on regions of one or more blank-only lines.
 Only called by font-lock if `indent-bars-display-on-blank-lines'



reply via email to

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