From: Foxe Chen Date: Tue, 23 Dec 2025 20:29:08 +0000 (+0000) Subject: patch 9.1.2014: clipboard: clipboard register corrupted with clipboard provider X-Git-Tag: v9.1.2014^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11c3c62aa8e735d12c2a295db688e70743359264;p=thirdparty%2Fvim.git patch 9.1.2014: clipboard: clipboard register corrupted with clipboard provider Problem: clipboard: clipboard register corrupted with clipboard provider (Satoru Kitaguchi and mikoto2000 after v9.1.1972) Solution: Only adjust clipboard register points to the unnamed register (Foxe Chen) fixes: #18983 fixes: #18988 closes: #19000 Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 5130a28318..0cef5f7e29 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2025 Dec 21 +*options.txt* For Vim version 9.1. Last change: 2025 Dec 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1823,7 +1823,7 @@ A jump table for the options with a short description can be found at |Q_op|. prepend, e.g.: > set clipboard^=unnamed < When using the GUI see |'go-A'|. - When using the |clipboard-providers| feature, only the "unamed" and + When using the |clipboard-providers| feature, only the "unnamed" and "unnamedplus" features will be recognized If compiled without the |+clipboard| feature but compiled with the |+clipboard_provider| feature, then they will be the only values allowed and the other diff --git a/src/clipboard.c b/src/clipboard.c index 1d46b56f0b..d016ee3caf 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -3534,7 +3534,7 @@ adjust_clip_reg(int *rp) #ifdef FEAT_CLIPBOARD_PROVIDER if (clipmethod == CLIPMETHOD_PROVIDER) { - if (clip_unnamed != 0) + if (*rp == 0 && clip_unnamed != 0) *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS)) ? '+' : '*'; return; } diff --git a/src/version.c b/src/version.c index 9ab09606fd..77c2fd181b 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2014, /**/ 2013, /**/