[vim/vim] Vim pastes visual selection as '*' clipboard register despite it may not own the clipboard (Issue #20057)

2 views
Skip to first unread message

依云

unread,
8:42 AM (4 hours ago) 8:42 AM
to vim/vim, Subscribed
lilydjwg created an issue (vim/vim#20057)

Steps to reproduce

  1. gvim --clean
  2. Enter visual mode
  3. Select some text in another application; this makes Vim lose the primary selection clipboard's ownership
  4. Middle-click to paste the primary selection (or "*p to try to replace the visual selection with the primary selection)
  5. Vim pastes the visual selection, not the primary selection
  6. It regains the primary selection automatically

https://github.com/vim/vim/blob/0f9218851dc91a855c3d186ccd05f550907cf37e/src/ops.c#L3900-L3906

Practically this means I can't paste into Vim from primary selection when I leave Vim in visual mode accidentally or because I have just pasted from Vim into another application before.

Expected behaviour

Vim fetches and pastes the primary selection.

Version of Vim

9.2.389

Environment

Arch Linux, GNOME Terminal / GTK 3 GUI, Wayfire Wayland compositor.

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20057@github.com>

Reply all
Reply to author
Forward
0 new messages