[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 76b7f45 16/22: fix bug jumping to function def in shorthan
From: |
Dmitry Gutov |
Subject: |
[elpa] master 76b7f45 16/22: fix bug jumping to function def in shorthand property:value literal |
Date: |
Tue, 19 Feb 2019 06:06:47 -0500 (EST) |
branch: master
commit 76b7f45f7c664486a412b00dbc6a1468fc03c46e
Author: Jason Bell <address@hidden>
Commit: Jason Bell <address@hidden>
fix bug jumping to function def in shorthand property:value literal
---
js2-mode.el | 3 ++-
tests/navigation.el | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/js2-mode.el b/js2-mode.el
index 8543c73..6aca826 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -12746,7 +12746,8 @@ it marks the next defun after the ones already marked."
(error "Node is not a supported jump node"))
(push (or (and names (pop names))
(unless (and (js2-object-prop-node-p parent)
- (eq node (js2-object-prop-node-left parent)))
+ (eq node (js2-object-prop-node-left parent))
+ (not (js2-node-get-prop parent 'SHORTHAND)))
node)
(error "Node is not a supported jump node")) names)
(setq node-init (js2-search-scope node names))
diff --git a/tests/navigation.el b/tests/navigation.el
index a8ec0cd..26431da 100644
--- a/tests/navigation.el
+++ b/tests/navigation.el
@@ -74,6 +74,9 @@
"function aFunction(p1, p2) {return p1+p2}; module.exports =
{aFunction:aFunction};"
67 16 "Node is not a supported jump node"))
+(ert-deftest js2-jump-to-function-inside-property-value-syntax ()
+ (js2-navigation-helper "function aFunction(p1, p2) {return p1+p2};
module.exports = {aFunction};" 1 6))
+
;; forward-sexp
- [elpa] master 58006df 20/22: Release new version, (continued)
- [elpa] master 58006df 20/22: Release new version, Dmitry Gutov, 2019/02/19
- [elpa] master 381545b 08/22: Make js2-additional-externs safe as a local variable, Dmitry Gutov, 2019/02/19
- [elpa] master ed955e7 21/22: Update NEWS, Dmitry Gutov, 2019/02/19
- [elpa] master 4125b49a 04/22: Merge pull request #487 from lelit/classify-imported, Dmitry Gutov, 2019/02/19
- [elpa] master 1b0e174 12/22: Don't record js2-xml-ref-node's in js2-recorder-identifiers, Dmitry Gutov, 2019/02/19
- [elpa] master 5165f4d 19/22: Merge pull request #507 from piotr-yuxuan/patch-1, Dmitry Gutov, 2019/02/19
- [elpa] master 4de0e2d 05/22: Don't warn about trailing commas by default, Dmitry Gutov, 2019/02/19
- [elpa] master f863e08 18/22: Update README.md, Dmitry Gutov, 2019/02/19
- [elpa] master d76b4df 09/22: Merge pull request #492 from felipeochoa/additional-externs-safe-local, Dmitry Gutov, 2019/02/19
- [elpa] master b92b3ae 15/22: allow testing for specific errors and add test for object property, Dmitry Gutov, 2019/02/19
- [elpa] master 76b7f45 16/22: fix bug jumping to function def in shorthand property:value literal,
Dmitry Gutov <=
- [elpa] master 19be337 11/22: Merge pull request #496 from wyuenho/bug495, Dmitry Gutov, 2019/02/19
- [elpa] master c5cc951 22/22: Merge commit 'ed955e7f1608cfd2d2713129d65f5fd734842ae4' from js2-mode, Dmitry Gutov, 2019/02/19