emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 3106e3c 37/49: Fix arrow expression function's length


From: Dmitry Gutov
Subject: [elpa] master 3106e3c 37/49: Fix arrow expression function's length
Date: Mon, 16 Jan 2017 15:35:49 +0000 (UTC)

branch: master
commit 3106e3c47dde930fdd4867e8583fd7e9bb418996
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fix arrow expression function's length
    
    Fixes #394.
---
 js2-mode.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js2-mode.el b/js2-mode.el
index 12a5c6a..788aa52 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -8343,7 +8343,7 @@ Last token scanned is the close-curly for the function 
body."
         (when (eq function-type 'FUNCTION_STATEMENT)
           (js2-record-imenu-functions fn-node))))
 
-    (setf (js2-node-len fn-node) (- js2-ts-cursor pos))
+    (setf (js2-node-len fn-node) (- (js2-current-token-end) pos))
     ;; Rhino doesn't do this, but we need it for finding undeclared vars.
     ;; We wait until after parsing the function to set its parent scope,
     ;; since `js2-define-symbol' needs the defining-scope check to stop



reply via email to

[Prev in Thread] Current Thread [Next in Thread]