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

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

[nongnu] elpa/go-mode 8baa836 251/495: Don't break fontification when li


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 8baa836 251/495: Don't break fontification when limiting point
Date: Sat, 7 Aug 2021 09:05:25 -0400 (EDT)

branch: elpa/go-mode
commit 8baa8365245ce8212e058c7717dbbf8e9fdd90b1
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    Don't break fontification when limiting point
    
    When highlighting parameters in function declarations, we limit
    ourselves to the end point given to us by emacs. The code path for that
    was broken, however, leading to broken fontification and errors in the
    message log.
    
    Updates gh-90
---
 go-mode.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index b19c495..88709b0 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -764,8 +764,7 @@ that `font-lock-mode' gave to us."
             ((zerop i)
              nil)
             (t
-             (setcdr (nth i regions) nil)
-             regions)))))
+             (butlast regions (- (length regions) i)))))))
 
 (defun go--make-match-data (regions)
   (let ((deficit (- (* 2 go--font-lock-func-param-num-groups)



reply via email to

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