branch: elpa/nix-mode
commit eb109c7a7f1af9772598b7cbcb98366c2836a831
Merge: 1268096ba7 183d4212e2
Author: Matthew Justin Bauer <mjbaue...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #26 from ljli/lex-pos-fix
    
    Fix fontification bug
---
 nix-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index 282078abbf..a2d6dec078 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -209,7 +209,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))
@@ -220,7 +220,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