branch: elpa/nix-mode
commit 0624820fd32915539a17bf012cb7f1a789268a5b
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>

    Fix org-mode fontification error.
    
    This seems to fix the issue found in NixOS/nix#1040. It still needs
    confirmation from @rzetterberg.
---
 nix-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nix-mode.el b/nix-mode.el
index 67a211aec0..99e0f9f0de 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -27,7 +27,7 @@
   "Find antiquote within a Nix expression up to LIMIT."
   (let ((pos (next-single-char-property-change (point) 'nix-syntax-antiquote
                                                nil limit)))
-    (when (and pos (> pos (point)))
+    (when (and pos (> pos (point)) (< pos (point-max)))
       (goto-char pos)
       (let ((char (char-after pos)))
         (pcase char

Reply via email to