"Debugging aid: highlight selected AST node on mouse click."
(interactive "e")
(mouse-set-point event)
- (let ((node (js2-node-at-point))
- beg end)
- (when js2-mode-show-overlay
+ (setq deactivate-mark t)
+ (when js2-mode-show-overlay
+ (let ((node (js2-node-at-point))
+ beg end)
(if (null node)
(message "No node found at location %s" (point))
(setq beg (js2-node-abs-pos node)
(js2-node-short-name (js2-node-parent node))
"nil"))))))
-(put 'js2-mode-show-node 'CUA 'move)
-
(defun js2-mode-hide-overlay (&optional p1 p2)
"Remove the debugging overlay when the point moves.
P1 and P2 are the old and new values of point, respectively."