0

I often run into an issue where I will click in a Emacs frame to make it active and accidentally slide my cursor so that it changes from a click to a drag. This means that some text is highlighted which can change behavior of the next commands I run (I am using evil-mode, so this puts me into visual state, but this is applicable outside of evil mode as well).

I don't want to completely disable the mouse, as I find it quite useful I just want to disable selecting text on a drag operation. I tried the following, but it lead to weird behavior (when the pointer leaving frames it will select text and it will still select one character sometimes).

(define-key evil-motion-state-map [down-mouse-1] 'ignore)

Is there a way to accomplish disabling drag to select (in evil specifically or outside)?

  • Because I have emacs full screen (with multiple monitors) and so there is no title bar or edge :) – Prgrm.celeritas Feb 8 at 19:54
  • Also I will often click on the window I want to select. – Prgrm.celeritas Feb 8 at 22:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.