branch: elpa/nix-mode
commit 183d4212e258c60aea33eed6bee180ba32419c56
Author: Leon Isenberg <[email protected]>
Commit: Leon Isenberg <[email protected]>

    Fix fontification bug
    
    The position to continue lexing was computed incorrect.
---
 nix-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index b99b2efafd..24a6fe175d 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -207,7 +207,7 @@
                      ((or (string-match "^\\\\\"" ahead)
                           (string-match "^\\\\\\${" ahead))
                       (nix--mark-string (1+ start) string-type)
-                      (goto-char (match-end 0)))
+                      (goto-char (+ start (match-end 0) 1)))
                      ((string-match-p "^\"" ahead)
                       (goto-char (+ 2 start)))
                      ((< (1+ start) (point-max))
@@ -218,7 +218,7 @@
                           (string-match "^''\\${" ahead)
                           (string-match "^''\\\\[nrt]" ahead))
                       (nix--mark-string (1+ start) string-type)
-                      (goto-char (match-end 0)))
+                      (goto-char (+ start (match-end 0) 1)))
                      ((string-match-p "^''" ahead)
                       (goto-char (+ 3 start)))
                      ((< (1+ start) (point-max))

Reply via email to