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

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

[nongnu] elpa/eglot-inactive-regions 4fc6480bed 18/66: Move forward if f


From: ELPA Syncer
Subject: [nongnu] elpa/eglot-inactive-regions 4fc6480bed 18/66: Move forward if forward-same-syntax does not
Date: Fri, 6 Dec 2024 06:59:52 -0500 (EST)

branch: elpa/eglot-inactive-regions
commit 4fc6480bed063b431477ede9d660a36c7fc3af98
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <Filippo.Argiolas@telit.com>

    Move forward if forward-same-syntax does not
    
    Fixes (maybe) a bug of the while loop getting stuck when
    forward-same-syntax didn't move the pointer ahead. Still not sure why it
    worked with treesitter modes and failed with c and especially cpp modes.
    
    Might have to look into it a bit deeper.
---
 clangd-inactive-regions.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clangd-inactive-regions.el b/clangd-inactive-regions.el
index ede62702ae..3dd2d3dfe8 100644
--- a/clangd-inactive-regions.el
+++ b/clangd-inactive-regions.el
@@ -190,6 +190,8 @@ foreground colors, if the face doesn't exist yet create it."
           (goto-char from)
           (while (<= (point) to)
             (forward-same-syntax)
+            (when (eq beg (point))
+              (forward-char))
             ;; no need to dim whitespace
             (unless (string-match-p "[[:blank:]\n]" (string (char-before)))
               (let* ((cur-face (clangd-inactive-regions--get-face (1- 
(point))))



reply via email to

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