1

I've made these bindings.

  (define-key prog-mode-map [double-down-mouse-1] 'evil-jump-to-tag)
  (define-key evil-motion-state-map [down-mouse-1] nil)
  (define-key prog-mode-map [mouse-8] 'xref-pop-marker-stack)

It works but there's a little problem. If the postion to go is different with the current, then evil/emacs goes into visual mode. I've tried to figure out but I couldn't.

Fortunately, I've figured out what's happenning once double-clicking thru command-log-mode. Here those are.

<down-mouse-1>
       evil-mouse-drag-region
<mouse-1>  mouse-set-point
<double-down-mouse-1>
       evil-jump-to-tag

I think those preceding 2 and are causing the weird visual selection and wrong cursor postion.

Please let me know if you know how to disable those 2 only once I'd like to jump to the definition by double-clicking.

Thanks. in advance.

windrg00
  • 457
  • 3
  • 9

1 Answers1

1

This has helped me resolve this issue. Put in your .emacs file the following:

(with-eval-after-load 'evil-maps (define-key evil-motion-state-map [down-mouse-1] nil))

It is not entirely clear what is causing the behaviour. Please see this issue which I have reported to the evil-mode developers, where Vasilij Schneidermann (@wasamasa) has kindly suggested the above workaround.

Unfortunately, it does not seem they are likely to solve it. I hope the workaround helps you.

I have also reported it on the Emacs bug mailing list.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135