Skip to content

Commit

Permalink
Merge pull request #606 from evorion/patch-1
Browse files Browse the repository at this point in the history
Make js2-beginning-of-defun skip comments
  • Loading branch information
dgutov authored Dec 5, 2024
2 parents 62d6cb1 + 67f2a48 commit e0c3028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -12867,7 +12867,7 @@ to beginning of previous script-level element.
With ARG N, do that N times. If N is negative, move forward."
(setq arg (or arg 1))
(if (cl-plusp arg)
(let ((parent (js2-node-parent-script-or-fn (js2-node-at-point))))
(let ((parent (js2-node-parent-script-or-fn (js2-node-at-point nil t))))
(when (cond
((js2-function-node-p parent)
(goto-char (js2-node-abs-pos parent)))
Expand Down

0 comments on commit e0c3028

Please sign in to comment.