1. Frank Fischer
  2. evil
  3. Issues
Issue #226 resolved

Double clicking discrepency between emacs and normal states

epich
created an issue

If I have the string /tmp/foo.txt in the scratch buffer and double click on the second '/' character, the behavior is different in emacs state and normal state.

In emacs state, the entire path is selected: /tmp/foo.txt

In normal state, a sub portion of the path is selected: tmp/

I remember this used to work, actually. I bisected to:

commit 7178b54104bb725e072f6eea0fa55b442a4c09f4
Author: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>
Date:   Sat Jul 28 21:09:08 2012 +0200

    Add mouse support

    The mouse dragging function from mouse.el are copied and adapted to
    evil. Clicking and dragging with the mouse does not activate the
    region but the appropriate visual state, otherwise those functions
    behave as Emacs' own functions. This addresses #158.

Comments (3)

  1. Frank Fischer repo owner

    Make double-click mouse selection configurable.

    The double-click mouse selection starts a special visual state that selects words. The customization variable `evil-mouse-word' can be used to specify the movement function to be used for the word selection.

    This addresses #226.

    → <<cset 937da8679fc5>>

  2. Frank Fischer repo owner
    • changed status to open

    This, besides that only the slash should be selected, a feature, not a bug. Double-clicking selects "words" like vim, not whatever Emacs selects. But you can now customize the variable evil-mouse-word. Maybe setting it to evil-move-WORD does what you want.

  3. Log in to comment