]> git.feebdaed.xyz Git - 0xmirror/vim.git/commitdiff
patch 9.1.2014: clipboard: clipboard register corrupted with clipboard provider
authorFoxe Chen <chen.foxe@gmail.com>
Tue, 23 Dec 2025 20:29:08 +0000 (20:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 23 Dec 2025 20:29:08 +0000 (20:29 +0000)
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 <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/options.txt
src/clipboard.c
src/version.c

index 5130a28318f8ac2564e13a415609e324f089f07e..0cef5f7e29d7f071473ac5dbb9736f0073d0f131 100644 (file)
@@ -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
index 1d46b56f0b0b52798e1d8e0017e0d4a09cc8893d..d016ee3cafcf3d8c5174c37151cd19154337aab9 100644 (file)
@@ -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;
     }
index 9ab09606fd504cbcb22245b4afe324913b0c2eb3..77c2fd181b76b1cd14c6aea3c8e644807077745e 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2014,
 /**/
     2013,
 /**/