[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eglot-inactive-regions 4881848cbc 1/2: check next-single-p
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eglot-inactive-regions 4881848cbc 1/2: check next-single-property-change return code |
Date: |
Thu, 13 Mar 2025 01:01:08 -0400 (EDT) |
branch: elpa/eglot-inactive-regions
commit 4881848cbcc49fa6291bbefdeae6b55b767bc95f
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <filippo.argiolas@gmail.com>
check next-single-property-change return code
next-single-property-change returns nil if face does not change til the
end of a fontification region. This led to jit-lock errors and
unshaded regions with c-ts-mode and darken-foreground. Properly handle
return code. Fix #2.
---
eglot-inactive-regions.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eglot-inactive-regions.el b/eglot-inactive-regions.el
index e9c8be4ee6..72c3abe4e4 100644
--- a/eglot-inactive-regions.el
+++ b/eglot-inactive-regions.el
@@ -239,15 +239,15 @@ If the correspondend \"eglot-inactive\" face doesn't not
exist yet create it."
(save-restriction
(widen)
(goto-char from)
- (while (<= (point) to)
- (goto-char (next-single-property-change (point) 'face))
+ (while (< (point) to)
+ (goto-char (or (next-single-property-change (point) 'face) to))
(let* ((cur-face (eglot-inactive-regions--get-face (1-
(point))))
(eglot-inactive-face
(eglot-inactive-regions--make-darken-face cur-face))
(ov (make-overlay beg (point))))
(overlay-put ov 'face eglot-inactive-face)
(push ov eglot-inactive-regions--overlays)))
(setq beg (point)))))
- (setq start to)))))
+ (setq start to)))))
(defun eglot-inactive-regions-refresh ()
"Force a refresh of known inactive regions.