[vim/vim] feat(mouse): change Alt+click/drag to reset selection origin (PR #19957)

2 views
Skip to first unread message

Fletcher Gornick

unread,
Apr 11, 2026, 1:29:30 PM (11 hours ago) Apr 11
to vim/vim, Subscribed

Hi! I previously proposed a similar change in Neovim (neovim/neovim#38943), but it wasn’t accepted there. I’m opening it here as it may be more appropriate for Vim itself.

Happy to adjust or drop this if it doesn’t align with Vim’s intended behavior. I'll leave another description below.

Problem

Alt+click/drag in Visual Block mode expands the selection relative to the furthest corner of the existing block, rather than the position where the drag started.

Solution

Update the selection anchor to the position of the initial click, so that dragging behaves consistently with standard mouse-based visual selections (left-click/drag).

The current behavioris from 6496966 for reference.

Before After
before.gif (view on web) after.gif (view on web)

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19957

Commit Summary

  • 780e276 feat(mouse): change Alt+click/drag to reset selection origin

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19957@github.com>

Fletcher Gornick

unread,
Apr 11, 2026, 1:48:18 PM (11 hours ago) Apr 11
to vim/vim, Push

@fmgornick pushed 1 commit.

  • ab8d5cc feat(mouse): change Alt+click/drag to reset selection origin


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19957/before/445b79379d99ae966c290ab6ddf0807a84910865/after/ab8d5cc82e1f142d8472dddd0df9d88153e8b2ca@github.com>

Reply all
Reply to author
Forward
0 new messages