]> code.delx.au - gnu-emacs-elpa/commitdiff
js2-re-search-forward-inner: Handle the case when string ends right after match
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 18 Nov 2013 16:42:15 +0000 (18:42 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 18 Nov 2013 16:42:37 +0000 (18:42 +0200)
Follow-up to #123

js2-mode.el

index 15fd78d5dca8a663a6c436703ce580831ce69918..115104f427f078dadf6b3782878849f9d29b6199 100644 (file)
@@ -9605,7 +9605,7 @@ of continued expressions.")
                     (syntax-ppss (point))))
       (cond ((nth 3 parse)
              (re-search-forward
-              (concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
+              (concat "\\(\\=\\|[^\\]\\|^\\)" (string (nth 3 parse)))
               (save-excursion (end-of-line) (point)) t))
             ((nth 7 parse)
              (forward-line))