]> code.delx.au - gnu-emacs-elpa/commitdiff
Only jump if not already at var or function definition
authorScottyB <scott.n.barnett@gmail.com>
Thu, 3 Sep 2015 23:53:56 +0000 (09:53 +1000)
committerScottyB <scott.n.barnett@gmail.com>
Mon, 7 Sep 2015 07:36:28 +0000 (17:36 +1000)
js2-mode.el

index 939e90430d7c0ce6e182d6a832da6b8afd2ec805..81dfb16cbf1dca4e362a72d30a8743213495d647 100644 (file)
@@ -12307,7 +12307,9 @@ it marks the next defun after the ones already marked."
          (parent (js2-node-parent node))
          (names (if (js2-prop-get-node-p parent)(reverse (js2-names-left node))))
          node-init)
-    (unless (js2-name-node-p node)
+    (unless (and (js2-name-node-p node)
+               (not (js2-var-init-node-p parent))
+               (not (js2-function-node-p parent)))
       (error "Node is not a supported jump node"))
     (push (or (and names (pop names))
              (unless (and (js2-object-prop-node-p parent)