]> git.feebdaed.xyz Git - 0xmirror/vim.git/commit
patch 9.1.1940: clipboard registers "+" and "*" synced without "autoselect"
authorCorey Hickey <bugfood-c@fatooh.org>
Sun, 30 Nov 2025 15:16:16 +0000 (15:16 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 30 Nov 2025 15:16:16 +0000 (15:16 +0000)
commitaa133f8b3e20042186a8968d07f2465a24b4178c
tree78cdc47c8dc49f3be19694f50bce91081dfd68de
parent6e9694df10a32cfe3314c2487f4f0110c4d3de67
patch 9.1.1940: clipboard registers "+" and "*" synced without "autoselect"

Problem:  clipboard registers "+" and "*" synced without "autoselect"
Solution: Remove code that explicitly syncs those clipboard registers
          (Corey Hickey)

Before this change, writes to '+' get copied to '*', but only under
certain conditions. By default, this does not happen, because clipboard
"autoselect" (via :set clipboard+=autoselect) is enabled. Disabling
"autoselect" (an option which should only apply to visual mode) results
in normal-mode writes such as "+yy also going to the '*' register.

This behavior is undocumented and untested; remove the behavior in order
to make Vim's handling of these two registers be consistent.

This frees up the did_star variable to be removed.

Add a test to check that the registers are independent.

fixes: #18830
closes: #18831

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/register.c
src/testdir/test_registers.vim
src/version.c