]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1873: Clipboard provider feature broke clipboard support v9.1.1873
authorFoxe Chen <chen.foxe@gmail.com>
Sun, 26 Oct 2025 13:43:15 +0000 (13:43 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 26 Oct 2025 13:46:05 +0000 (13:46 +0000)
Problem:  Clipboard provider feature broke clipboard support
          (Yee Cheng Chin)
Solution: Revert clipboard changes (Foxe Chen).

fixes: #18600
closes: #18633

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
28 files changed:
runtime/doc/builtin.txt
runtime/doc/eval.txt
runtime/doc/options.txt
runtime/doc/tags
runtime/doc/various.txt
runtime/doc/version9.txt
runtime/doc/wayland.txt
runtime/syntax/vim.vim
src/auto/configure
src/clipboard.c
src/config.h.in
src/configure.ac
src/evalfunc.c
src/evalvars.c
src/feature.h
src/globals.h
src/gui.c
src/optiondefs.h
src/optionstr.c
src/proto/evalfunc.pro
src/register.c
src/testdir/Make_all.mak
src/testdir/test_clipboard_provider.vim [deleted file]
src/testdir/test_clipmethod.vim
src/testdir/test_eval_stuff.vim
src/testdir/test_options.vim
src/version.c
src/vim.h

index 7389a86b9d69d7f116d5f72c734cb79bf2ea43b5..b37a08e21d56d4b401036cf4450006f9a621bfa0 100644 (file)
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 Oct 14
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -13061,7 +13061,6 @@ channel                 Compiled with support for |channel| and |job|
 cindent                        Compiled with 'cindent' support. (always true)
 clientserver           Compiled with remote invocation support |clientserver|.
 clipboard              Compiled with 'clipboard' support.
-clipboard_provider     Compiled with |clipboard-providers| support
 clipboard_working      Compiled with 'clipboard' support and it can be used.
 cmdline_compl          Compiled with |cmdline-completion| support.
 cmdline_hist           Compiled with |cmdline-history| support.
index 0f81f4d6b9e55b751da07b1316419c84a63655df..3ec387d1bf0ae0a77567d8123c7acedec20837b4 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*     For Vim version 9.1.  Last change: 2025 Oct 18
+*eval.txt*     For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -38,7 +38,6 @@ a remark is given.
 12. The sandbox                        |eval-sandbox|
 13. Textlock                   |textlock|
 14. Vim script library         |vim-script-library|
-15. Clipboard providers                |clipboard-providers|
 
 Testing support is documented in |testing.txt|.
 Profiling is documented at |profiling|.
@@ -2246,17 +2245,10 @@ v:clipmethod    The current method of accessing the clipboard that is being
                used.  Can either have the value of:
                        wayland         The Wayland protocol is being used.
                        x11             X11 selections are being used.
-                       gui             GUI specific method is being used
-                       other           Some other method is being used
-                       none            Clipboard functionality is disabled or
-                                       unavailable.
+                       none            The above methods are unavailable or
+                                       cannot be used.
                See 'clipmethod' for more details.
 
-                                       *v:clipproviders*
-v:clipproviders
-               A dictionary containing clipboard providers, see
-               |clipboard-providers| for more information.
-
                                        *v:cmdarg* *cmdarg-variable*
 v:cmdarg       This variable is used for two purposes:
                1. The extra arguments given to a file read/write command.
@@ -5269,134 +5261,5 @@ Usage: >vim
        :call dist#vim9#Launch(<args>)
        :Launch <app> <args>.
 <
-==============================================================================
-15. Clipboard providers                                        *clipboard-providers*
-
-When Vim is compiled with the |+clipboard_provider| feature, which requires
-the |+eval| feature, creating custom clipboards is possible.  These providers
-handle the "+" and "*" registers.  Note that if |+wayland_clipboard| or
-|+xterm_clipboard| features are not compiled in, then the "+" register will
-not be available.
-
-To add a provider, add a new entry to the |v:clipproviders| dictionary, in the
-format of: >
-       let v:clipproviders["name"] = {
-            \   "available": function("Available"),
-            \   "paste": {
-            \       '+': function("Paste"), " For the + register
-            \       '*': function("Paste"), " For the * register
-            \   },
-            \   "copy": {
-            \       '+': function("Copy"), " Same thing as above
-            \       '*': function("Copy"),
-            \   },
-            \ }
-
-The key is the provider name, which should be used in 'clipmethod', for
-example in the following example, you would add "name" to 'clipmethod' in
-order to use it. >
-       set clipmethod=name,wayland,x11,gui
-
-Each callback can either be a name of a function in a string, a |Funcref|, or
-a |lambda| expression.
-
-Note that these dictionary entries are optional, for example, if you don't
-care about the "copy" functions, then you can simply exclude them.  When Vim
-yanks/copies something, then simply nothing will be done.
-
-                                               *clipboard-provider-available*
-The "available" callback should return a string, which should contain which
-clipboard registers are available.  For example, if the "+" register is only
-available, then the function would return "+", or if both "+" and "*" are
-available, then return "+*".
-
-                                               *clipboard-provider-paste*
-The "paste" callback takes a first argument which is the register being put
-(string), and a second argument which is the type of access (string).  It
-should return either a tuple/list or string.  If a tuple/list is returned, it
-should have two elements:
-       - The register type conforming to |setreg()|.
-       - A list of strings
-If the register type is an empty string, then the type is automatically
-chosen, see |setreg()|.  If a string is returned, then it can either be "clear"
-or "previous".  "clear" makes Vim clear the register, and "previous" makes Vim
-use the previous register contents (or current depending on how you view it).
-
-The second argument, the access type, can either be "explicit" or "implicit".
-"explicit" means that the user is directly accessing the clipboard, such as
-putting text, or calling |getreg()|;  "implicit" means that the clipboard is
-being accessed indirectly, such when |:registers| is called, or when an
-unrelated operation causes Vim to access the clipboard.
-
-This is useful since some operations in Vim implicity access the clipboard
-indirectly.  For example, if when you want to create a provider for the OSC52
-command (accessing the clipboard via an escape code).  Many terminals show a
-confirmation if you want Vim to access the clipboard.  This can be very
-annoying with the terminal asking for permission everytime you do something
-that accesses the clipboard behind the scenes.  A good way to handle implicit
-access is to return "previous", which leaves the register contents unchanged.
-
-                                               *clipboard-provider-copy*
-The "copy" callback returns nothing, and takes the given arguments in order:
-       - The register being operated on
-       - The register type, conforming to |getregtype()|
-       - A list of strings to copy
-
-The provider can do whatever it wants with the given information.  This
-function is called on every request to change the clipboard register(s).
-
-                                               *clipboard-provider-textlock*
-In both the "paste" and "copy" callbacks, it is not allowed to change the
-buffer text, see |textlock|.
-
-                                               *clipboard-provider-example*
-Here is an example script that uses the clipboard provider feature through the
-OSC52 command: >vim
-
-       func Available()
-         return "*"
-       endfunc
-
-       func Paste(reg, type)
-         " If implicit access, don't do anything
-         if a:type == "implicit"
-           return "previous"
-         endif
 
-         augroup OSC
-           autocmd!
-           autocmd TermResponseAll osc ++once call feedkeys("\<F30>", '!')
-         augroup END
-
-         " Send command
-         call echoraw("\<Esc>]52;;?\<Esc>\\")
-
-         " Wait until autocmd is triggered
-         while getchar(-1) != "\<F30>"
-         endwhile
-
-         autocmd! OSC
-
-         " Extract the base64 stuff
-         let l:stuff = matchstr(v:termosc, '52;.\+;\zs[A-Za-z0-9+/=]\+')
-
-         return ("", blob2str(base64_decode(l:stuff)))
-       endfunc
-
-       func Copy(reg, type, lines)
-         call echoraw("\<Esc>]52;c;" ..
-           \ base64_encode(str2blob(a:lines)) .. "\<Esc>\\")
-       endfunc
-       let v:clipproviders["myosc"] = {
-           \   "available": function("Available"),
-           \   "paste": {
-           \     '*': function("Paste")
-           \   },
-           \   "copy": {
-           \     '*': function("Copy")
-           \   },
-           \ }
-       set clipmethod=myosc
-
-<
  vim:tw=78:ts=8:noet:ft=help:norl:
index 837edfe8158869e1ac41107b65eef0a5ee7cea33..65a6359ce74965b334a83953fa1f59d2da9f1c72 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Oct 25
+*options.txt*  For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1907,35 +1907,30 @@ A jump table for the options with a short description can be found at |Q_op|.
                        {pattern}, this must be the last entry.
 
                                                *'clipmethod'* *'cpm'*
-'clipmethod' 'cpm'     string  (default for Unix: "wayland,x11,gui,other",
-                                for VMS: "x11,gui,other",
-                                otherwise: "gui,other")
+'clipmethod' 'cpm'     string  (default for Unix: "wayland,x11",
+                                for VMS: "x11",
+                                otherwise: "")
                        global
-                       {only when the |+clipboard| feature is included}
+                       {only when the |+xterm_clipboard| or
+                       |+wayland_clipboard| features are included}
        Specifies which method of accessing the system clipboard is used,
        depending on which method works first or is available.  Supported
        methods are:
                wayland         Wayland selections
                x11             X11 selections
-               gui             GUI specific method
-               other           Some other method
-               *               Clipboard provider method
 
-       Note: "other" is used on systems without X11/Wayland, such as
-       MS-Windows or MacOS, when running Vim without the GUI.
-
-       Note that the name of the clipboard provider should be used when you
-       want to use a clipboard provider.  See |clipboard-providers| for more
-       information.
+       Note: This option is ignored when either the GUI is running or if Vim
+       is run on a system without Wayland or X11 support, such as Windows or
+       macOS.  The GUI or system way of accessing the clipboard is always
+       used instead.
 
        The option value is a list of comma separated items.  The list is
        parsed left to right in order, and the first method that Vim
        determines is available or is working is used as the actual method for
-       accessing the clipboard.  Setting this option to an empty value
-       disables the clipboard functionality on all systems.
+       accessing the clipboard.
 
-       The current method that is being used can be found in the
-       |v:clipmethod| variable.
+       The current method that is being used can be found in the |v:clipmethod|
+       variable.
 
                                                *'cmdheight'* *'ch'*
 'cmdheight' 'ch'       number  (default 1)
index df78fc45fc2e94bf93e9392050d9adf3ad57cf0f..f53d05631f7bcbfcfdfc4d6c90a99f95a8f731cc 100644 (file)
@@ -1411,9 +1411,6 @@ $quote    eval.txt        /*$quote*
 +cindent       various.txt     /*+cindent*
 +clientserver  various.txt     /*+clientserver*
 +clipboard     various.txt     /*+clipboard*
-+clipboard_plus_avail  various.txt     /*+clipboard_plus_avail*
-+clipboard_provider    various.txt     /*+clipboard_provider*
-+clipboard_star_avail  various.txt     /*+clipboard_star_avail*
 +clipboard_working     various.txt     /*+clipboard_working*
 +cmd   editing.txt     /*+cmd*
 +cmdline_compl various.txt     /*+cmdline_compl*
@@ -6694,12 +6691,6 @@ clipboard-autoselectml   options.txt     /*clipboard-autoselectml*
 clipboard-autoselectplus       options.txt     /*clipboard-autoselectplus*
 clipboard-exclude      options.txt     /*clipboard-exclude*
 clipboard-html options.txt     /*clipboard-html*
-clipboard-provider-available   eval.txt        /*clipboard-provider-available*
-clipboard-provider-copy        eval.txt        /*clipboard-provider-copy*
-clipboard-provider-example     eval.txt        /*clipboard-provider-example*
-clipboard-provider-paste       eval.txt        /*clipboard-provider-paste*
-clipboard-provider-textlock    eval.txt        /*clipboard-provider-textlock*
-clipboard-providers    eval.txt        /*clipboard-providers*
 clipboard-unnamed      options.txt     /*clipboard-unnamed*
 clipboard-unnamedplus  options.txt     /*clipboard-unnamedplus*
 clojure-indent indent.txt      /*clojure-indent*
@@ -11264,7 +11255,6 @@ v:char  eval.txt        /*v:char*
 v:charconvert_from     eval.txt        /*v:charconvert_from*
 v:charconvert_to       eval.txt        /*v:charconvert_to*
 v:clipmethod   eval.txt        /*v:clipmethod*
-v:clipproviders        eval.txt        /*v:clipproviders*
 v:cmdarg       eval.txt        /*v:cmdarg*
 v:cmdbang      eval.txt        /*v:cmdbang*
 v:collate      eval.txt        /*v:collate*
index c7ed02764bb1fe076c33cbfb1d2a2799297b072b..8b245b38c232b765e63fbe4aaea9a1a3d8e5b733 100644 (file)
@@ -1,4 +1,4 @@
-*various.txt*   For Vim version 9.1.  Last change: 2025 Oct 16
+*various.txt*   For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -378,14 +378,7 @@ m  *+channel*              inter process communication |channel|
 T  *+cindent*          'cindent', C indenting; Always enabled
 N  *+clientserver*     Unix and Win32: Remote invocation |clientserver|
    *+clipboard*                |clipboard| support compiled-in
-N  *+clipboard_provider*  |clipboard-providers| support compiled-in
    *+clipboard_working*        |clipboard| support compiled-in and working
-   *+clipboard_star_avail*
-                       |clipboard| support compiled-in and star "*" register
-                       available
-   *+clipboard_plus_avail*
-                       |clipboard| support compiled-in and separate plus "+"
-                       register available
 T  *+cmdline_compl*    command line completion |cmdline-completion|
 T  *+cmdline_hist*     command line history |cmdline-history|
 T  *+cmdline_info*     'showcmd' and 'ruler'; Always enabled since
@@ -814,10 +807,7 @@ K                  Run a program to lookup the keyword under the
 :clip[reset]           Attempts to choose a new method for accessing the
                        clipboard, using the 'clipmethod' option.  This is
                        useful when the current method has become unavailable,
-                       and you want to try using another method.  If the
-                       |+clipboard_provider| feature is being used, this
-                       command should be called after the availability of one
-                       of the clipboard registers changes.
+                       and you want to try using another method.
                        {only available when compiled with the |+clipboard|
                        feature}
 
index b2a1f96b26bea2c7d7590e95b46a9f4a87d904b4..f40fe49fca648663ae6521becbbff3472e76fe45 100644 (file)
@@ -1,4 +1,4 @@
-*version9.txt*  For Vim version 9.1.  Last change: 2025 Oct 14
+*version9.txt*  For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -41653,8 +41653,6 @@ Other new features ~
 
 - |items()| function now supports Blob.
 
-- |clipboard-providers| support.
-
                                                        *changed-9.2*
 Changed~
 -------
@@ -41903,8 +41901,6 @@ Options: ~
 
 Vim Variables: ~
 |v:clipmethod|         The current 'clipmethod'.
-|v:clipproviders|      A dictionary containing clipboard providers
-                       information.
 |v:stacktrace|         The most recent caught exception.
 |v:t_enumvalue|                Value of |enumvalue|.
 |v:t_enum|             Value of |enum| type.
@@ -41923,8 +41919,6 @@ Configure Switches: ~
 --enable-wayland-focus-steal   Enable the |wayland-focus-steal| feature.
 --enable-socketserver          Enable the |socketserver-clientserver|
                                feature.
---enable-clipboard-provider    Enable the |clipboard-providers| feature.
-
 
 ==============================================================================
 INCOMPATIBLE CHANGES                                   *incompatible-9.2*
index da28657a1e6b234798ee0ee981488c639fff6672..300b9c5b965fd2279138cbe09f27ce79808ccbcb 100644 (file)
@@ -1,4 +1,4 @@
-*wayland.txt*   For Vim version 9.1.  Last change: 2025 Oct 12
+*wayland.txt*   For Vim version 9.1.  Last change: 2025 Oct 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -22,7 +22,7 @@ multiple Wayland seats in the same Wayland session.
 See |gui-wayland|.  Please note that when using the GUI, Vim uses the toolkit
 such as GTK for accessing the clipboard, and does not access the clipboard
 though Wayland.  You can check this though the |v:clipmethod| variable, which
-should equal to "gui" when running the GUI.
+should equal to "none" when running the GUI.
 
 Wayland commands:
                                                        *:wlrestore* *:wl*
@@ -73,7 +73,7 @@ selections, see |wayland-primary-selection| for more details.
                                                        *wayland-persist*
 If you use X11 cut buffers, no such things exist on Wayland.  Instead to
 emulate such functionality, a separate clipboard manager must be used in order
-to persist selection data when a Wayland client exits.
+to persist selection data when a Wayland client exists.
 
                                                        *wayland-and-x11*
 If your version of Vim comes compiled with both X11 and Wayland support, then
index bd2458f5b12b1f20f5267b7d4d4ef43e65192787..a2b8d171f4f81d92b17721b6aaf8147e6bc1d7d4 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Oct 14
+" Last Change:    2025 Oct 26
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -166,7 +166,7 @@ syn keyword vimFuncName contained win_execute win_findbuf win_getid win_gettype
 " Predefined variable names {{{2
 " GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR=''
 syn keyword vimVimVarName contained count count1 prevcount errmsg warningmsg statusmsg shell_error this_session version lnum termresponse fname lang lc_time ctype charconvert_from charconvert_to fname_in fname_out fname_new fname_diff cmdarg foldstart foldend folddashes foldlevel progname servername dying exception throwpoint register cmdbang insertmode val key profiling fcs_reason fcs_choice beval_bufnr beval_winnr beval_winid beval_lnum beval_col beval_text scrollstart swapname swapchoice swapcommand char mouse_win mouse_winid mouse_lnum mouse_col operator searchforward hlsearch oldfiles windowid progpath completed_item option_new option_old option_oldlocal option_oldglobal option_command option_type errors false true none null numbermax numbermin numbersize
-syn keyword vimVimVarName contained vim_did_enter testing t_number t_string t_func t_list t_dict t_float t_bool t_none t_job t_channel t_blob t_class t_object termrfgresp termrbgresp termu7resp termstyleresp termblinkresp event versionlong echospace argv collate exiting colornames sizeofint sizeoflong sizeofpointer maxcol python3_version t_typealias t_enum t_enumvalue stacktrace t_tuple wayland_display clipmethod termda1 termosc clipproviders
+syn keyword vimVimVarName contained vim_did_enter testing t_number t_string t_func t_list t_dict t_float t_bool t_none t_job t_channel t_blob t_class t_object termrfgresp termrbgresp termu7resp termstyleresp termblinkresp event versionlong echospace argv collate exiting colornames sizeofint sizeoflong sizeofpointer maxcol python3_version t_typealias t_enum t_enumvalue stacktrace t_tuple wayland_display clipmethod termda1 termosc
 
 "--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim ---
 
index 525584d1daf751fb916433c1a07969e7ce772e2a..7cf35d66deddc7ddc81562a50d4b154ea89bb1a5 100755 (executable)
@@ -857,7 +857,6 @@ enable_arabic
 enable_farsi
 enable_xim
 enable_fontset
-enable_clipboard_provider
 with_wayland
 enable_wayland_focus_steal
 with_x
@@ -1540,7 +1539,6 @@ Optional Features:
   --disable-farsi         Deprecated.
   --enable-xim            Include XIM input support.
   --enable-fontset        Include X fontset output support.
-  --enable-clipboard-provider  Include clipboard provider support.
   --enable-wayland-focus-steal
                           Include focus stealing support for Wayland
                           clipboard.
@@ -9210,35 +9208,6 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
 printf "%s\n" "$enable_fontset" >&6; }
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-clipboard-provider" >&5
-printf %s "checking --enable-clipboard-provider... " >&6; }
-# Check whether --enable-clipboard-provider was given.
-if test ${enable_clipboard_provider+y}
-then :
-  enableval=$enable_clipboard_provider; enable_clipboard_provider=$enableval
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
-printf "%s\n" "$enableval" >&6; }
-else case e in #(
-  e) if test "x$features" = xtiny
-then :
-  enable_clipboard_provider="no"
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use clipboard provider with tiny features" >&5
-printf "%s\n" "cannot use clipboard provider with tiny features" >&6; }
-else case e in #(
-  e) enable_clipboard_provider="yes"
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; } ;;
-esac
-fi ;;
-esac
-fi
-
-if test "$enable_clipboard_provider" = "yes"; then
-  printf "%s\n" "#define FEAT_CLIPBOARD_PROVIDER 1" >>confdefs.h
-
-fi
-
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if shm_open is available" >&5
 printf %s "checking if shm_open is available... " >&6; }
 cppflags_save=$CPPFLAGS
index e51138669037275d131b962f720ce86f27e3256c..13fcae6060fe2737a187110139290ed0a88a9266 100644 (file)
@@ -134,12 +134,6 @@ static bool clip_wl_owner_exists(Clipboard_T *cbd);
 
 #endif // FEAT_WAYLAND_CLIPBOARD
 
-#ifdef FEAT_CLIPBOARD_PROVIDER
-static int clip_provider_is_available(Clipboard_T *cbd, char_u *provider);
-static void clip_provider_set_selection(Clipboard_T *cbd, char_u *provider);
-static void clip_provider_request_selection(Clipboard_T *cbd, char_u *provider);
-#endif
-
 /*
  * Selection stuff using Visual mode, for cutting and pasting text to other
  * windows.
@@ -237,36 +231,32 @@ clip_update_selection(Clipboard_T *clip)
 }
 
     static int
-clip_gen_own_selection(Clipboard_T *cbd UNUSED)
+clip_gen_own_selection(Clipboard_T *cbd)
 {
-    if (clipmethod == CLIPMETHOD_GUI)
-    {
-#ifdef FEAT_GUI
-       if (gui.in_use)
-           return clip_mch_own_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_WAYLAND)
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
+# ifdef FEAT_GUI
+    if (gui.in_use)
+       return clip_mch_own_selection(cbd);
+    else
+# endif
     {
+       if (clipmethod == CLIPMETHOD_WAYLAND)
+       {
 #ifdef FEAT_WAYLAND_CLIPBOARD
-       return clip_wl_own_selection(cbd);
+           return clip_wl_own_selection(cbd);
 #endif
-    }
-    else if (clipmethod == CLIPMETHOD_X11)
-    {
+       }
+       else if (clipmethod == CLIPMETHOD_X11)
+       {
 #ifdef FEAT_XCLIPBOARD
-       return clip_xterm_own_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_OTHER)
-    {
-#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
-       && !defined(FEAT_CLIPBOARD_PROVIDER)) \
-       || (!(defined(UNIX) || defined(MACOS_X)) && defined(FEAT_CLIPBOARD_PROVIDER))
-       return clip_mch_own_selection(cbd);
+           return clip_xterm_own_selection(cbd);
 #endif
+       }
     }
     return FAIL;
+#else
+    return clip_mch_own_selection(cbd);
+#endif
 }
 
     void
@@ -306,35 +296,31 @@ clip_own_selection(Clipboard_T *cbd)
 }
 
     static void
-clip_gen_lose_selection(Clipboard_T *cbd UNUSED)
+clip_gen_lose_selection(Clipboard_T *cbd)
 {
-    if (clipmethod == CLIPMETHOD_GUI)
-    {
-#ifdef FEAT_GUI
-       if (gui.in_use)
-           clip_mch_lose_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_WAYLAND)
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
+# ifdef FEAT_GUI
+    if (gui.in_use)
+       clip_mch_lose_selection(cbd);
+    else
+# endif
     {
+       if (clipmethod == CLIPMETHOD_WAYLAND)
+       {
 #ifdef FEAT_WAYLAND_CLIPBOARD
-       clip_wl_lose_selection(cbd);
+           clip_wl_lose_selection(cbd);
 #endif
-    }
-    else if (clipmethod == CLIPMETHOD_X11)
-    {
+       }
+       else if (clipmethod == CLIPMETHOD_X11)
+       {
 #ifdef FEAT_XCLIPBOARD
-       clip_xterm_lose_selection(cbd);
+           clip_xterm_lose_selection(cbd);
 #endif
+       }
     }
-    else if (clipmethod == CLIPMETHOD_OTHER)
-    {
-#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
-       && !defined(FEAT_CLIPBOARD_PROVIDER)) \
-       || (!(defined(UNIX) || defined(MACOS_X)) && defined(FEAT_CLIPBOARD_PROVIDER))
-       clip_mch_lose_selection(cbd);
+#else
+    clip_mch_lose_selection(cbd);
 #endif
-    }
 }
 
     void
@@ -1360,77 +1346,57 @@ clip_gen_set_selection(Clipboard_T *cbd)
            return;
        }
     }
-    if (clipmethod == CLIPMETHOD_GUI)
-    {
-#ifdef FEAT_GUI
-       if (gui.in_use)
-           clip_mch_set_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_WAYLAND)
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
+# ifdef FEAT_GUI
+    if (gui.in_use)
+       clip_mch_set_selection(cbd);
+    else
+# endif
     {
+       if (clipmethod == CLIPMETHOD_WAYLAND)
+       {
 #ifdef FEAT_WAYLAND_CLIPBOARD
-       clip_wl_set_selection(cbd);
+           clip_wl_set_selection(cbd);
 #endif
-    }
-    else if (clipmethod == CLIPMETHOD_X11)
-    {
+       }
+       else if (clipmethod == CLIPMETHOD_X11)
+       {
 #ifdef FEAT_XCLIPBOARD
-       clip_xterm_set_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_OTHER)
-    {
-#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
-       && !defined(FEAT_CLIPBOARD_PROVIDER)) \
-       || (!(defined(UNIX) || defined(MACOS_X)) && defined(FEAT_CLIPBOARD_PROVIDER))
-       clip_mch_set_selection(cbd);
+           clip_xterm_set_selection(cbd);
 #endif
+       }
     }
-    else if (clipmethod == CLIPMETHOD_PROVIDER)
-    {
-#ifdef FEAT_CLIPBOARD_PROVIDER
-       clip_provider_set_selection(cbd, clipprovider_name);
+#else
+    clip_mch_set_selection(cbd);
 #endif
-    }
 }
 
     static void
-clip_gen_request_selection(Clipboard_T *cbd UNUSED)
+clip_gen_request_selection(Clipboard_T *cbd)
 {
-    if (clipmethod == CLIPMETHOD_GUI)
-    {
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
 # ifdef FEAT_GUI
-       if (gui.in_use)
-           clip_mch_request_selection(cbd);
+    if (gui.in_use)
+       clip_mch_request_selection(cbd);
+    else
 # endif
-    }
-    else if (clipmethod == CLIPMETHOD_WAYLAND)
     {
+       if (clipmethod == CLIPMETHOD_WAYLAND)
+       {
 #ifdef FEAT_WAYLAND_CLIPBOARD
-       clip_wl_request_selection(cbd);
+           clip_wl_request_selection(cbd);
 #endif
-    }
-    else if (clipmethod == CLIPMETHOD_X11)
-    {
+       }
+       else if (clipmethod == CLIPMETHOD_X11)
+       {
 #ifdef FEAT_XCLIPBOARD
-       clip_xterm_request_selection(cbd);
-#endif
-    }
-    else if (clipmethod == CLIPMETHOD_OTHER)
-    {
-#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
-       && !defined(FEAT_CLIPBOARD_PROVIDER)) \
-       || (!(defined(UNIX) || defined(MACOS_X)) && defined(FEAT_CLIPBOARD_PROVIDER))
-       clip_mch_request_selection(cbd);
+           clip_xterm_request_selection(cbd);
 #endif
+       }
     }
-    else if (clipmethod == CLIPMETHOD_PROVIDER)
-    {
-#ifdef FEAT_CLIPBOARD_PROVIDER
-       clip_provider_request_selection(cbd, clipprovider_name);
+#else
+    clip_mch_request_selection(cbd);
 #endif
-    }
 }
 
 #if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
@@ -1447,28 +1413,31 @@ clip_x11_owner_exists(Clipboard_T *cbd)
     int
 clip_gen_owner_exists(Clipboard_T *cbd UNUSED)
 {
-    if (clipmethod == CLIPMETHOD_OTHER)
-    {
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
 # ifdef FEAT_GUI_GTK
-       if (gui.in_use)
-           return clip_gtk_owner_exists(cbd);
-# endif
-    }
-    else if (clipmethod == CLIPMETHOD_WAYLAND)
-    {
-# ifdef FEAT_WAYLAND_CLIPBOARD
-       return clip_wl_owner_exists(cbd);
+    if (gui.in_use)
+       return clip_gtk_owner_exists(cbd);
+    else
 # endif
-    }
-    else if (clipmethod == CLIPMETHOD_X11)
     {
-# ifdef FEAT_XCLIPBOARD
-       return clip_x11_owner_exists(cbd);
-# endif
+       if (clipmethod == CLIPMETHOD_WAYLAND)
+       {
+#ifdef FEAT_WAYLAND_CLIPBOARD
+           return clip_wl_owner_exists(cbd);
+#endif
+       }
+       else if (clipmethod == CLIPMETHOD_X11)
+       {
+#ifdef FEAT_XCLIPBOARD
+           return clip_x11_owner_exists(cbd);
+#endif
+       }
+       else
+           return FALSE;
     }
-    else
-       return FALSE;
-    return FALSE;
+#else
+    return TRUE;
+#endif
 }
 #endif
 
@@ -2292,18 +2261,10 @@ clip_get_selection(Clipboard_T *cbd)
     }
     else if (!is_clipboard_needs_update())
     {
-#ifdef FEAT_CLIPBOARD_PROVIDER
-       // We will choose if we want to the free the selection if using provider
-       if (clipmethod != CLIPMETHOD_PROVIDER)
-           clip_free_selection(cbd);
-#endif
+       clip_free_selection(cbd);
 
        // Try to get selected text from another window
        clip_gen_request_selection(cbd);
-#ifdef FEAT_CLIPBOARD_PROVIDER
-       if (clipmethod == CLIPMETHOD_PROVIDER)
-           clip_access_type = CLIP_ACCESS_IMPLICIT;
-#endif
     }
 }
 
@@ -3474,7 +3435,7 @@ clip_wl_owner_exists(Clipboard_T *cbd)
  * depending on the order of values in str.
  */
     static clipmethod_T
-get_clipmethod(char_u *str, bool *plus UNUSED, bool *star)
+get_clipmethod(char_u *str, bool *plus UNUSED, bool *star UNUSED)
 {
     int                len     = (int)STRLEN(str) + 1;
     char_u     *buf    = alloc(len);
@@ -3514,76 +3475,27 @@ get_clipmethod(char_u *str, bool *plus UNUSED, bool *star)
 #endif
            {
 #ifdef FEAT_XCLIPBOARD
-               // x_IOerror_handler() in os_unix.c should set xterm_dpy to NULL
-               // if we lost connection to the X server.
+               // x_IOerror_handler() in os_unix.c should set xterm_dpy to NULL if
+               // we lost connection to the X server.
                if (xterm_dpy != NULL)
                {
-                   // If the X connection is lost then that handler will
-                   // longjmp somewhere else, in that case we will call
-                   // choose_clipmethod() again from there, and this if block
-                   // won't be executed since xterm_dpy will be set to NULL.
+                   // If the X connection is lost then that handler will longjmp
+                   // somewhere else, in that case we will call choose_clipmethod()
+                   // again from there, and this if block won't be executed since
+                   // xterm_dpy will be set to NULL.
                    xterm_update();
                    method = CLIPMETHOD_X11;
-                   *plus = *star = true;
+                   *plus = *star = TRUE;
                }
 #endif
            }
        }
-       else if (STRCMP(buf, "gui") == 0)
-       {
-#ifdef FEAT_GUI
-           if (gui.in_use)
-           {
-               method = CLIPMETHOD_GUI;
-               *star = *plus = true;
-           }
-#endif
-       }
-       else if (STRCMP(buf, "other") == 0)
-       {
-#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
-       && !defined(FEAT_CLIPBOARD_PROVIDER)) \
-       || (!(defined(UNIX) || defined(MACOS_X)) && defined(FEAT_CLIPBOARD_PROVIDER))
-               method = CLIPMETHOD_OTHER;
-               *plus = *star = true;
-#endif
-       }
        else
        {
-#ifdef FEAT_CLIPBOARD_PROVIDER
-           // Check if it is the name of a provider
-#ifndef ONE_CLIPBOARD
-           int plus_avail = clip_provider_is_available(&clip_plus, buf);
-#endif
-           int star_avail = clip_provider_is_available(&clip_star, buf);
-
-           if (
-#ifndef ONE_CLIPBOARD
-                   plus_avail == 1 ||
-#endif
-                   star_avail == 1)
-           {
-               method = CLIPMETHOD_PROVIDER;
-
-               vim_free(clipprovider_name);
-               clipprovider_name = vim_strsave(buf);
-
-#ifndef ONE_CLIPBOARD
-               *plus = plus_avail == 1;
-#endif
-               *star = star_avail == 1;
-           }
-           else if (
-#ifndef ONE_CLIPBOARD
-                   plus_avail == -1 ||
-#endif
-                   star_avail == -1)
-#endif
-           {
-               ret = CLIPMETHOD_FAIL;
-               goto exit;
-           }
+           ret = CLIPMETHOD_FAIL;
+           goto exit;
        }
+
        // Keep on going in order to catch errors
        if (method != CLIPMETHOD_NONE && ret == CLIPMETHOD_FAIL)
            ret = method;
@@ -3601,30 +3513,17 @@ exit:
 /*
  * Returns name of clipmethod in a statically allocated string.
  */
-    static char_u *
+    static char *
 clipmethod_to_str(clipmethod_T method)
 {
     switch(method)
     {
        case CLIPMETHOD_WAYLAND:
-           return (char_u *)"wayland";
+           return "wayland";
        case CLIPMETHOD_X11:
-           return (char_u *)"x11";
-       case CLIPMETHOD_GUI:
-           return (char_u *)"gui";
-       case CLIPMETHOD_OTHER:
-           return (char_u *)"other";
-       case CLIPMETHOD_PROVIDER:
-#ifdef FEAT_CLIPBOARD_PROVIDER
-           if (clipprovider_name == NULL)
-               return (char_u *)"none";
-           else
-               return clipprovider_name;
-#else
-           return (char_u *)"none";
-#endif
+           return "x11";
        default:
-           return (char_u *)"none";
+           return "none";
     }
 }
 
@@ -3635,18 +3534,33 @@ clipmethod_to_str(clipmethod_T method)
     char *
 choose_clipmethod(void)
 {
-    bool plus = false;
-    bool star = false;
-    clipmethod_T method = get_clipmethod(p_cpm, &plus, &star);
+    bool regular = false, primary = false;
+    clipmethod_T method = get_clipmethod(p_cpm, &regular, &primary);
 
     if (method == CLIPMETHOD_FAIL)
        return e_invalid_argument;
 
-#if defined(FEAT_GUI) && defined(FEAT_WAYLAND)
-    if (method == CLIPMETHOD_GUI)
+// If GUI is running or we are not on a system with Wayland or X11, then always
+// return CLIPMETHOD_NONE. System or GUI clipboard handling always overrides.
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
+# if defined(FEAT_GUI)
+    if (gui.in_use)
+    {
+#  ifdef FEAT_WAYLAND
        // We only interact with Wayland for the clipboard, we can just deinit
        // everything.
        wayland_uninit_connection();
+#  endif
+
+       method = CLIPMETHOD_NONE;
+       goto lose_sel_exit;
+    }
+# endif
+#else
+    // If on a system like windows or macos, then clipmethod is irrelevant, we
+    // use their way of accessing the clipboard.
+    method = CLIPMETHOD_NONE;
+    goto exit;
 #endif
 
     // Deinitialize clipboard if there is no way to access clipboard
@@ -3655,41 +3569,40 @@ choose_clipmethod(void)
     // If we have a clipmethod that works now, then initialize clipboard
     else if (clipmethod == CLIPMETHOD_NONE && method != CLIPMETHOD_NONE)
     {
-#ifndef ONE_CLIPBOARD
-       clip_init_single(&clip_plus, plus);
+       clip_init_single(&clip_plus, regular);
+       clip_init_single(&clip_star, primary);
        clip_plus.did_warn = false;
-#endif
-       clip_init_single(&clip_star, star);
        clip_star.did_warn = false;
     }
-    else if ((clipmethod != CLIPMETHOD_NONE && method != clipmethod))
+    // Disown clipboard if we are switching to a new method
+    else if (clipmethod != CLIPMETHOD_NONE && method != clipmethod)
     {
-       // Disown clipboard if we are switching to a new method
+#if (defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)) \
+       && defined(FEAT_GUI)
+lose_sel_exit:
+#endif
        if (clip_star.owned)
            clip_lose_selection(&clip_star);
-       clip_init_single(&clip_star, star);
-#ifndef ONE_CLIPBOARD
        if (clip_plus.owned)
            clip_lose_selection(&clip_plus);
-       clip_init_single(&clip_plus, plus);
+
+#if defined(FEAT_GUI)
+       if (!gui.in_use)
 #endif
+       {
+           clip_init_single(&clip_plus, regular);
+           clip_init_single(&clip_star, primary);
+       }
     }
-    else
-    {
-       // If availability of a clipboard changed, then update the clipboard
-       // structure.
-#ifndef ONE_CLIPBOARD
-       if (plus != clip_plus.available)
-           clip_init_single(&clip_plus, plus);
+
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+exit:
 #endif
-       if (star != clip_star.available)
-           clip_init_single(&clip_star, star);
-    }
 
     clipmethod = method;
 
 #ifdef FEAT_EVAL
-    set_vim_var_string(VV_CLIPMETHOD, clipmethod_to_str(method), -1);
+    set_vim_var_string(VV_CLIPMETHOD, (char_u*)clipmethod_to_str(method), -1);
 #endif
 
     return NULL;
@@ -3712,325 +3625,4 @@ ex_clipreset(exarg_T *eap UNUSED)
                clipmethod_to_str(clipmethod));
 }
 
-#ifdef FEAT_CLIPBOARD_PROVIDER
-
-/*
- * Check if a clipboard provider with given name exists and is available for the
- * given clipboard. Returns 1 if the provider exists and the 'available'
- * function returned true, 0 if the provider exists but the function returned
- * false, and -1 on error.
- */
-    static int
-clip_provider_is_available(Clipboard_T *cbd, char_u *provider)
-{
-    dict_T     *providers = get_vim_var_dict(VV_CLIPPROVIDERS);
-    typval_T   provider_tv = {0};
-    callback_T callback = {0};
-    typval_T   rettv = {0};
-    typval_T   func_tv = {0};
-    char_u     *avail;
-    int                res = 0;
-
-    if (dict_get_tv(providers, (char *)provider, &provider_tv) == FAIL
-           || provider_tv.v_type != VAR_DICT)
-       return -1;
-
-    if (dict_get_tv(provider_tv.vval.v_dict, "available", &func_tv) == FAIL)
-    {
-       clear_tv(&provider_tv);
-       // If "available" functon not specified assume always TRUE
-       return 1;
-    }
-
-    if ((callback = get_callback(&func_tv)).cb_name == NULL)
-       goto fail;
-
-    if (call_callback(&callback, -1, &rettv, 0, NULL) == FAIL ||
-           rettv.v_type != VAR_STRING)
-       goto fail;
-
-    avail = rettv.vval.v_string;
-
-
-    if (
-#ifndef ONE_CLIPBOARD
-           (vim_strchr(avail, '+') != NULL && cbd == &clip_plus) ||
-#endif
-           (vim_strchr(avail, '*') != NULL && cbd == &clip_star))
-       res = 1;
-
-    if (FALSE)
-fail:
-       res = -1;
-
-    free_callback(&callback);
-    clear_tv(&func_tv);
-    clear_tv(&rettv);
-    clear_tv(&provider_tv);
-
-    return res;
-}
-
-/*
- * Get the specified callback "function" from the provider dictionary of for
- * register "reg".
- */
-    static int
-clip_provider_get_callback(
-       char_u *reg,
-       char_u *provider,
-       char_u *function,
-       callback_T *callback)
-{
-    dict_T     *providers = get_vim_var_dict(VV_CLIPPROVIDERS);
-    typval_T   provider_tv;
-    typval_T   action_tv;
-    typval_T   func_tv;
-    callback_T cb;
-
-    if (dict_get_tv(providers, (char *)provider, &provider_tv) == FAIL)
-       return FAIL;
-    else if (provider_tv.v_type != VAR_DICT)
-    {
-       clear_tv(&provider_tv);
-       return FAIL;
-    }
-    else if (dict_get_tv(
-               provider_tv.vval.v_dict,
-               (char *)function,
-               &action_tv) == FAIL)
-    {
-       clear_tv(&provider_tv);
-       return FAIL;
-    }
-    else if (action_tv.v_type != VAR_DICT)
-    {
-       clear_tv(&provider_tv);
-       clear_tv(&action_tv);
-       return FAIL;
-    }
-    else if (dict_get_tv(action_tv.vval.v_dict, (char *)reg, &func_tv) == FAIL)
-    {
-       clear_tv(&provider_tv);
-       clear_tv(&action_tv);
-       return FAIL;
-    }
-    else if ((cb = get_callback(&func_tv)).cb_name == NULL)
-    {
-       clear_tv(&provider_tv);
-       clear_tv(&action_tv);
-       clear_tv(&func_tv);
-       return FAIL;
-    }
-    clear_tv(&provider_tv);
-    clear_tv(&action_tv);
-
-    // func_tv owns the function name, so we must make a copy for the callback
-    set_callback(callback, &cb);
-    free_callback(&cb);
-    clear_tv(&func_tv);
-    return OK;
-}
-
-    static void
-clip_provider_set_selection(Clipboard_T *cbd, char_u *provider)
-{
-    char_u     *reg = (char_u *)(cbd == &clip_star ? "*" : "+");
-    callback_T callback;
-    typval_T   rettv;
-    typval_T   argvars[4];
-    yankreg_T  *y_ptr;
-    char_u     type[2 + NUMBUFLEN] = {0};
-    list_T     *list = NULL;
-
-    if (clip_provider_get_callback(
-               reg,
-               provider,
-               (char_u *)"copy",
-               &callback) == FAIL)
-       return;
-
-    // Possibly get selected text, if using autoselect for 'clipboard'
-    cbd->owned = TRUE;
-    clip_get_selection(cbd);
-    cbd->owned = FALSE;
-
-    // Convert register type into a string
-    if (cbd == &clip_plus)
-       y_ptr = get_y_register(PLUS_REGISTER);
-    else
-       y_ptr = get_y_register(STAR_REGISTER);
-
-    switch (y_ptr->y_type)
-    {
-       case MCHAR:
-           type[0] = 'v';
-           break;
-       case MLINE:
-           type[0] = 'V';
-           break;
-       case MBLOCK:
-           sprintf((char *)type, "%c%d", Ctrl_V, y_ptr->y_width + 1);
-           break;
-       default:
-           type[0] = 0;
-           break;
-    }
-
-    argvars[0].v_type = VAR_STRING;
-    argvars[0].vval.v_string = reg;
-
-    argvars[1].v_type = VAR_STRING;
-    argvars[1].vval.v_string = type;
-
-    // Get register contents by creating a list of lines
-    list = list_alloc();
-
-    if (list == NULL)
-    {
-       free_callback(&callback);
-       return;
-    }
-
-    for (int i = 0; i < y_ptr->y_size; i++)
-       if (list_append_string(list, y_ptr->y_array[i].string, -1) == FAIL)
-       {
-           free_callback(&callback);
-           list_unref(list);
-           return;
-       }
-
-    list->lv_refcount++;
-
-    argvars[2].v_type = VAR_LIST;
-    argvars[2].v_lock = VAR_FIXED;
-    argvars[2].vval.v_list = list;
-
-    argvars[3].v_type = VAR_UNKNOWN;
-
-    textlock++;
-    call_callback(&callback, -1, &rettv, 3, argvars);
-    clear_tv(&rettv);
-    textlock--;
-
-    free_callback(&callback);
-    list_unref(list);
-}
-
-    static void
-clip_provider_request_selection(Clipboard_T *cbd, char_u *provider)
-{
-    char_u     *reg = (char_u *)(cbd == &clip_star ? "*" : "+");
-    callback_T callback;
-    typval_T   argvars[3];
-    typval_T   rettv;
-    int                ret;
-    char_u     *reg_type;
-    list_T     *lines;
-
-    if (clip_provider_get_callback(
-               reg,
-               provider,
-               (char_u *)"paste",
-               &callback) == FAIL)
-       return;
-
-    argvars[0].v_type = VAR_STRING;
-    argvars[0].vval.v_string = reg;
-
-    argvars[1].v_type = VAR_STRING;
-    argvars[1].vval.v_string = (char_u *)
-       (clip_access_type == CLIP_ACCESS_EXPLICIT ? "explicit" : "implicit");
-
-    argvars[2].v_type = VAR_UNKNOWN;
-
-    textlock++;
-    ret = call_callback(&callback, -1, &rettv, 2, argvars);
-    textlock--;
-
-    if (ret == FAIL)
-       goto exit;
-    else if (rettv.v_type == VAR_STRING
-           && STRCMP(rettv.vval.v_string, "clear") == 0)
-    {
-       clip_free_selection(cbd);
-       goto exit;
-    }
-    else if (rettv.v_type == VAR_STRING
-           && STRCMP(rettv.vval.v_string, "previous") == 0)
-       goto exit;
-    else if (rettv.v_type == VAR_TUPLE
-           && TUPLE_LEN(rettv.vval.v_tuple) == 2
-           && TUPLE_ITEM(rettv.vval.v_tuple, 0)->v_type == VAR_STRING
-           && TUPLE_ITEM(rettv.vval.v_tuple, 1)->v_type == VAR_LIST)
-    {
-       reg_type = TUPLE_ITEM(rettv.vval.v_tuple, 0)->vval.v_string;
-       lines = TUPLE_ITEM(rettv.vval.v_tuple, 1)->vval.v_list;
-    }
-    else if (rettv.v_type == VAR_LIST
-           && rettv.vval.v_list->lv_len == 2
-           && rettv.vval.v_list->lv_first->li_tv.v_type == VAR_STRING
-           && rettv.vval.v_list->lv_first->li_next->li_tv.v_type == VAR_LIST)
-    {
-       reg_type = rettv.vval.v_list->lv_first->li_tv.vval.v_string;
-       lines = rettv.vval.v_list->lv_first->li_next->li_tv.vval.v_list;
-    }
-    else
-       goto exit;
-
-    {
-       char_u      yank_type = MAUTO;
-       long        block_len = -1;
-       yankreg_T   *y_ptr;
-       char_u      **contents;
-       listitem_T  *li;
-       int         i = 0;
-
-       contents = ALLOC_MULT(char_u *, lines->lv_len + 1); // Ends with a NULL
-
-       if (contents == NULL)
-           goto exit;
-
-       // Convert strings in list to type char_u **
-       FOR_ALL_LIST_ITEMS(lines, li)
-       {
-           char_u *str = tv_get_string_chk(&li->li_tv);
-
-           if (str == NULL)
-               goto exit;
-
-           contents[i++] = vim_strsave(str);
-       }
-       contents[i] = NULL;
-
-       if (STRLEN(reg_type) > 0
-               && get_yank_type(&reg_type, &yank_type, &block_len) == FAIL)
-           goto exit;
-
-       if (cbd == &clip_plus)
-           y_ptr = get_y_register(PLUS_REGISTER);
-       else
-           y_ptr = get_y_register(STAR_REGISTER);
-
-       clip_free_selection(cbd);
-
-       str_to_reg(y_ptr,
-               yank_type,
-               (char_u *)contents,
-               STRLEN(contents),
-               block_len,
-               TRUE);
-
-       for (int k = 0; k < i; k++)
-           vim_free(contents[k]);
-       vim_free(contents);
-    }
-
-exit:
-    free_callback(&callback);
-    clear_tv(&rettv);
-}
-
-#endif // FEAT_CLIPBOARD_PROVIDER
-
 #endif // FEAT_CLIPBOARD
index eb0937d393d2728c73f3f6ecbf2e80f00899da6b..983f186b8d1d7225dcbeb3ad8721bd495a8038b0 100644 (file)
 
 /* Define if you want to load libgpm dynamically */
 #undef DYNAMIC_GPM
-
-/* Define if you want to have clipboard provider functionality*/
-#undef FEAT_CLIPBOARD_PROVIDER
index 635b5f7222cc94ca24c76625c06f28bebf93bb7c..fa6757d69f0c27a6da345a9ea970a83e6b0aff16 100644 (file)
@@ -2434,21 +2434,6 @@ AC_ARG_ENABLE(fontset,
 AC_MSG_RESULT($enable_fontset)
 dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
 
-AC_MSG_CHECKING(--enable-clipboard-provider)
-AC_ARG_ENABLE(clipboard-provider,
-       [  --enable-clipboard-provider  Include clipboard provider support.],
-       [enable_clipboard_provider=$enableval
-        AC_MSG_RESULT($enableval)],
-       AS_IF([test "x$features" = xtiny], 
-                       [enable_clipboard_provider="no"
-                        AC_MSG_RESULT([cannot use clipboard provider with tiny features])],
-                       [enable_clipboard_provider="yes"
-                        AC_MSG_RESULT([yes])]))
-if test "$enable_clipboard_provider" = "yes"; then
-  AC_DEFINE(FEAT_CLIPBOARD_PROVIDER)
-fi
-
-
 AC_MSG_CHECKING(if shm_open is available)
 cppflags_save=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
index 1438f221190771d19bf38408868b64de60793257..7c3139edc5de0f5232ab6dae9103eb547e7cf93f 100644 (file)
@@ -6500,11 +6500,6 @@ f_getreg(typval_T *argvars, typval_T *rettv)
            return;
     }
 
-#ifdef FEAT_CLIPBOARD_PROVIDER
-    if (clipmethod == CLIPMETHOD_PROVIDER)
-       clip_access_type = CLIP_ACCESS_EXPLICIT;
-#endif
-
     if (return_list)
     {
        rettv->v_type = VAR_LIST;
@@ -6871,13 +6866,6 @@ f_has(typval_T *argvars, typval_T *rettv)
                1
 #else
                0
-#endif
-               },
-       {"clipboard_provider",
-#ifdef FEAT_CLIPBOARD_PROVIDER
-               1
-#else
-               0
 #endif
                },
        {"cmdline_compl", 1},
@@ -7929,26 +7917,8 @@ f_has(typval_T *argvars, typval_T *rettv)
        else if (STRICMP(name, "clipboard_working") == 0)
        {
            x = TRUE;
-#ifdef FEAT_CLIPBOARD
-           n = clip_star.available || clip_plus.available;
-#endif
-       }
-       else if (STRICMP(name, "clipboard_star_avail") == 0)
-       {
-           x = TRUE;
 #ifdef FEAT_CLIPBOARD
            n = clip_star.available;
-#endif
-       }
-       else if (STRICMP(name, "clipboard_plus_avail") == 0)
-       {
-           x = TRUE;
-#ifdef FEAT_CLIPBOARD
-# ifdef ONE_CLIPBOARD
-           n = FALSE;
-# else
-           n = clip_plus.available;
-# endif
 #endif
        }
     }
@@ -11523,7 +11493,7 @@ f_setpos(typval_T *argvars, typval_T *rettv)
 /*
  * Translate a register type string to the yank type and block length
  */
-    int
+    static int
 get_yank_type(char_u **pp, char_u *yank_type, long *block_len)
 {
     char_u *stropt = *pp;
index 1bf41e85cf0b31b06787edb4fc4fa29e0927ef60..c840d872bd04f32ca6a5b47712e4d690761acd1f 100644 (file)
@@ -166,8 +166,7 @@ static struct vimvar
     {VV_NAME("wayland_display",  VAR_STRING), NULL, VV_RO},
     {VV_NAME("clipmethod",      VAR_STRING), NULL, VV_RO},
     {VV_NAME("termda1",                 VAR_STRING), NULL, VV_RO},
-    {VV_NAME("termosc",                 VAR_STRING), NULL, VV_RO},
-    {VV_NAME("clipproviders",   VAR_DICT), &t_dict_string, VV_RO}
+    {VV_NAME("termosc",         VAR_STRING), NULL, VV_RO},
 };
 
 // shorthand
index 6860cbd981c4d89dcd44c83a09a9b5ecc76bae46..11700a060d6fa747d43ce27b2f8020f1f3b92c37 100644 (file)
 # define FEAT_CLIPBOARD
 #endif
 
-/*
- * +clipboard_provider Allow Vim to use clipboard providers
- */
-#if defined(FEAT_CLIPBOARD_PROVIDER)
-# ifndef FEAT_EVAL
-#  undef FEAT_CLIPBOARD_PROVIDER
-# else
-#  ifndef FEAT_CLIPBOARD
-#   define FEAT_CLIPBOARD
-#  endif
-# endif
-#endif
-
 #ifdef FEAT_GUI
 # ifndef FEAT_CLIPBOARD
 #  define FEAT_CLIPBOARD
index eb9e07cf02ac6210c07b58d3bdce47b316b2b9e0..6eba836d442f28cbafb09463b39d35c426b316f9 100644 (file)
@@ -2067,9 +2067,6 @@ EXTERN int        p_tgc_set INIT(= FALSE);
 
 #ifdef FEAT_CLIPBOARD
 EXTERN clipmethod_T clipmethod INIT(= CLIPMETHOD_NONE);
-# ifdef FEAT_CLIPBOARD_PROVIDER
-EXTERN char_u *clipprovider_name INIT(= NULL);
-# endif
 #endif
 
 #ifdef FEAT_WAYLAND
@@ -2119,16 +2116,3 @@ INIT(= CLIENTSERVER_METHOD_NONE);
 // Path to socket of last client that communicated with us
 EXTERN char_u *client_socket INIT(= NULL);
 #endif
-
-#ifdef FEAT_CLIPBOARD_PROVIDER
-typedef enum
-{
-    CLIP_ACCESS_IMPLICIT,
-    CLIP_ACCESS_EXPLICIT,
-} clip_access_T;
-
-// Only relevant for the clipboard provider feature. This indicates if the
-// clipboard request is implicit (ex. access when doing :registers),
-// explicit (ex. typing "+p). Always defaults to implicit.
-EXTERN clip_access_T clip_access_type INIT(= CLIP_ACCESS_IMPLICIT);
-#endif
index 1e4dbdc85c81da87398cce0d1b9f56e77fda5fa8..8c37d8740ec3e343b5930424bc6891bdda64b48c 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -147,7 +147,7 @@ gui_start(char_u *arg UNUSED)
 #endif
     }
     else
-       // Reset clipmethod to CLIPMETHOD_GUI
+       // Reset clipmethod to CLIPMETHOD_NONE
        choose_clipmethod();
 
 #ifdef FEAT_SOCKETSERVER
index b5c649f27ab353e071b2c9f8a0d262803ef6c703..7f893d89da481f5e65546488d6793aef3a009ff8 100644 (file)
@@ -638,11 +638,11 @@ static struct vimoption options[] =
 #ifdef FEAT_CLIPBOARD
                            (char_u *)&p_cpm, PV_NONE, did_set_clipmethod, expand_set_clipmethod,
 # ifdef UNIX
-                           {(char_u *)"wayland,x11,gui,other", (char_u *)0L}
+                           {(char_u *)"wayland,x11", (char_u *)0L}
 # elif defined(VMS)
-                           {(char_u *)"x11,gui,other", (char_u *)0L}
+                           {(char_u *)"x11", (char_u *)0L}
 # else
-                           {(char_u *)"gui,other", (char_u *)0L}
+                           {(char_u *)"", (char_u *)0L}
 # endif
 #else
                            (char_u *)NULL, PV_NONE, NULL, NULL,
index 6bfb752531ab980ea4095f0704f4738004d293b3..b4bfe742dfdd6dd84cfb571e4a2ddf051f0ac3ff 100644 (file)
@@ -45,7 +45,7 @@ static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
 // Note: Keep this in sync with did_set_clipboard()
 static char *(p_cb_values[]) = {"unnamed", "unnamedplus", "autoselect", "autoselectplus", "autoselectml", "html", "exclude:", NULL};
 // Note: Keep this in sync with get_clipmethod()
-static char *(p_cpm_values[]) = {"wayland", "x11", "gui", "other", NULL};
+static char *(p_cpm_values[]) = {"wayland", "x11", NULL};
 #endif
 #ifdef FEAT_CRYPT
 static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2",
index dad8c6771a801abc33f37bd0e502110d5828f873..627af17a8ba68e77dec6e888d1ede86668354e9c 100644 (file)
@@ -28,5 +28,4 @@ void f_len(typval_T *argvars, typval_T *rettv);
 void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
 void range_list_materialize(list_T *list);
 long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
-int get_yank_type(char_u **pp, char_u *yank_type, long *block_len);
 /* vim: set ft=c : */
index 8d0ed7ace3c9dac437a94d645d78aa5598a7af56..1b3f60ec541cad259730d1632251d0ce99c65670 100644 (file)
@@ -1559,10 +1559,6 @@ do_put(
 #ifdef FEAT_CLIPBOARD
     // Adjust register name for "unnamed" in 'clipboard'.
     adjust_clip_reg(&regname);
-# ifdef FEAT_CLIPBOARD_PROVIDER
-    if (clipmethod == CLIPMETHOD_PROVIDER)
-       clip_access_type = CLIP_ACCESS_EXPLICIT;
-# endif
     (void)may_get_selection(regname);
 #endif
 
index 61ce33a0a74656a17a40977065038afeae84fbe7..0d4aeb0432fb506008c5f9366e9ed5b1d275683c 100644 (file)
@@ -105,7 +105,6 @@ NEW_TESTS = \
        test_cjk_linebreak \
        test_clientserver \
        test_clipmethod \
-       test_clipboard_provider \
        test_close_count \
        test_cmd_lists \
        test_cmdline \
@@ -396,7 +395,6 @@ NEW_TESTS_RES = \
        test_cjk_linebreak.res \
        test_clientserver.res \
        test_clipmethod.res \
-       test_clipboard_provider.res \
        test_close_count.res \
        test_cmd_lists.res \
        test_cmdline.res \
diff --git a/src/testdir/test_clipboard_provider.vim b/src/testdir/test_clipboard_provider.vim
deleted file mode 100644 (file)
index ec9bc52..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-" Test for clipboard provider feature
-
-CheckFeature clipboard_provider
-
-func! AvailableBoth()
-    return "+*"
-endfunc
-
-func! AvailablePlus()
-    return "+"
-endfunc
-
-func! PasteList(reg, type)
-    return ["c", ["list"]]
-endfunc
-
-func! PasteTuple(reg, type)
-    return ("", ["tuple", "of", "strings"])
-endfunc
-
-func! PasteType(reg, type)
-    let g:vim_test_type = a:type
-    return ("c", [a:type])
-endfunc
-
-func! PasteRegType(reg, type)
-    return (g:vim_test_reg_type, ["7 chars"])
-endfunc
-
-func! Copy(reg, type, lines)
-    let g:vim_test_stuff = {
-                \ "type": a:type,
-                \ "lines": a:lines
-                \ }
-endfunc
-
-" Test if "available" function works properly for provider
-func Test_clipboard_provider_available()
-    CheckUnix
-    CheckFeature clipboard_plus_avail
-
-    let v:clipproviders["test"] = {
-                \ "available": function("AvailablePlus"),
-                \ "paste": {
-                \       '+': function("PasteList"),
-                \       '*': function("PasteList")
-                \   }
-                \ }
-
-    set clipmethod=test
-    call assert_equal("test", v:clipmethod)
-
-    call assert_equal("list", getreg("+"))
-    " Test if star register is unavailable
-    call assert_equal("", getreg("*"))
-
-    let v:clipproviders["test"] = {
-                \ "available": function("AvailableBoth"),
-                \ "paste": {
-                \       '+': function("PasteList"),
-                \       '*': function("PasteList")
-                \   }
-                \ }
-
-    clipreset
-
-    call assert_equal("list", getreg("+"))
-    call assert_equal("list", getreg("*"))
-
-    let v:clipproviders["test"] = {
-                \ "paste": {
-                \       '+': function("PasteList"),
-                \       '*': function("PasteList")
-                \   }
-                \ }
-
-    " Should default to TRUE
-    call assert_equal("list", getreg("+"))
-    call assert_equal("list", getreg("*"))
-
-    set clipmethod&
-endfunc
-
-" Test if "paste" functions work properly for provider
-func Test_clipboard_provider_paste()
-    " Test if tuples and lists work the same
-    let v:clipproviders["test"] = {
-                \ "paste": {
-                \       '*': function("PasteList")
-                \   }
-                \ }
-
-    set clipmethod=test
-    call assert_equal("test", v:clipmethod)
-
-    call assert_equal("list", getreg("*"))
-
-    let v:clipproviders["test"] = {
-                \ "paste": {
-                \       '*': function("PasteTuple")
-                \   }
-                \ }
-
-    call assert_equal("tuple\nof\nstrings\n", getreg("*"))
-
-    " Test if "implicit" and "explicit" arguments are correctly used
-    let v:clipproviders["test"] = {
-                \ "paste": {
-                \       '*': function("PasteType")
-                \   }
-                \ }
-
-    call assert_equal("explicit", getreg("*"))
-
-    :registers
-
-    call assert_equal("implicit", g:vim_test_type)
-    unlet g:vim_test_type
-
-    " Test if correct register type is used
-    let v:clipproviders["test"] = {
-                \ "paste": {
-                \       '*': function("PasteRegType")
-                \   }
-                \ }
-
-    let g:vim_test_reg_type = "v"
-    call assert_equal("v", getregtype("*"))
-    let g:vim_test_reg_type = "c"
-    call assert_equal("v", getregtype("*"))
-
-    let g:vim_test_reg_type = "l"
-    call assert_equal("V", getregtype("*"))
-    let g:vim_test_reg_type = "l"
-    call assert_equal("V", getregtype("*"))
-
-    let g:vim_test_reg_type = "b"
-    call assert_equal("\167", getregtype("*"))
-    let g:vim_test_reg_type = "\16"
-    call assert_equal("\167", getregtype("*"))
-
-    let g:vim_test_reg_type = "b40"
-    call assert_equal("\1640", getregtype("*"))
-
-    set clipmethod&
-endfunc
-
-" Test if "copy" functions work properly for provider
-func Test_clipboard_provider_copy()
-    let v:clipproviders["test"] = {
-                \ "copy": {
-                \       '*': function("Copy")
-                \   }
-                \ }
-
-    set clipmethod=test
-    call assert_equal("test", v:clipmethod)
-
-    call setreg("*", ["hello", "world", "!"], "c")
-    call assert_equal(["hello", "world", "!"], g:vim_test_stuff.lines)
-    call assert_equal("v", g:vim_test_stuff.type)
-
-    call setreg("*", ["hello", "world", "!"], "l")
-    call assert_equal(["hello", "world", "!"], g:vim_test_stuff.lines)
-    call assert_equal("V", g:vim_test_stuff.type)
-
-    call setreg("*", ["hello", "world", "!"], "b40")
-    call assert_equal(["hello", "world", "!"], g:vim_test_stuff.lines)
-    call assert_equal("\1640", g:vim_test_stuff.type)
-
-    set clipmethod&
-endfunc
index b1e447923946c0bad59c51ec0771567fd340c9bb..9b34658426b42c2faf3344489b4dfb7a7cbe447e 100644 (file)
@@ -1,12 +1,14 @@
 " Tests for clipmethod
 
-if has('unix')
-  source util/window_manager.vim
-endif
+source util/window_manager.vim
+
+CheckFeature clipboard_working
+CheckFeature xterm_clipboard
+CheckFeature wayland_clipboard
+CheckUnix
 
 " Test if no available clipmethod sets v:clipmethod to none and deinits clipboard
 func Test_no_clipmethod_sets_v_clipmethod_none()
-  CheckFeature clipboard_working
   CheckNotGui
 
   set clipmethod=
@@ -17,9 +19,6 @@ endfunc
 " Test if method chosen is in line with clipmethod order
 func Test_clipmethod_order()
   CheckNotGui
-  CheckFeature clipboard_working
-  CheckFeature xterm_clipboard
-  CheckFeature wayland_clipboard
 
   set cpm=wayland,x11
 
@@ -63,12 +62,12 @@ func Test_clipmethod_order()
   call EndWaylandCompositor(l:wayland_display)
 endfunc
 
-" Test if clipmethod is set to 'gui' when gui is started
-func Test_clipmethod_is_gui_when_gui_started()
+" Test if clipmethod is set to 'none' when gui is started
+func Test_clipmethod_is_none_when_gui()
   CheckCanRunGui
-  CheckFeature clipboard_working
 
   let lines =<< trim END
+    set cpm=wayland,x11
     call writefile([v:clipmethod != ""], 'Cbdscript')
     gui -f
     call writefile([v:clipmethod], 'Cbdscript', 'a')
@@ -79,15 +78,12 @@ func Test_clipmethod_is_gui_when_gui_started()
 
   call writefile(lines, 'Cbdscript', 'D')
   call system($'{GetVimCommand()} -S Cbdscript')
-  call assert_equal(['1', 'gui', 'gui'], readfile('Cbdscript'))
+  call assert_equal(['1', 'none', 'none'], readfile('Cbdscript'))
 endfunc
 
 " Test if :clipreset switches methods when current one doesn't work
 func Test_clipreset_switches()
   CheckNotGui
-  CheckFeature clipboard_working
-  CheckFeature xterm_clipboard
-  CheckFeature wayland_clipboard
   CheckFeature clientserver
   CheckXServer
   CheckWaylandCompositor
@@ -177,15 +173,4 @@ func Test_clipreset_switches()
   endif
 endfunc
 
-" Test if v:clipmethod is "other" on non-gui versions of MacOS and Windows
-" builds
-func Test_clipmethod_is_other_on_non_x11_wayland()
-  CheckFeature clipboard_working
-  CheckNotGui
-  CheckNotFeature wayland
-  CheckNotFeature x11
-
-  call assert_equal("other", v:clipmethod)
-endfunc
-
 " vim: shiftwidth=2 sts=2 expandtab
index 6adfb4d768a5eeb154beb6b3b1d6d0b3efe2adf6..39bb4ba9f2d08305420511511a232fcef6d5ab16 100644 (file)
@@ -727,50 +727,4 @@ func Test_eval_string_in_special_key()
   silent! echo 0{1-$"\<S--{>\17n|nö%\0
 endfunc
 
-func AvailableTest()
-  return g:vim_test_plus .. g:vim_test_star
-endfunc
-
-func Test_clipboard_runtime_features()
-  " Use clipboard provider because we can change if a register is available or
-  " not.
-  CheckFeature clipboard_provider
-  CheckFeature clipboard
-
-    let g:vim_test_plus = ''
-    let g:vim_test_star = ''
-
-  let v:clipproviders["evaltest"] = {
-        \ "available": function("AvailableTest")
-        \ }
-
-  set clipmethod=evaltest
-
-  if has('win32') || has('macunix') ||
-        \ (!has('wayland_clipboard') && !has('xterm_clipboard'))
-    let g:vim_test_plus = '+'
-    let g:vim_test_star = '*'
-    clipreset
-
-    " plus register should be disabled on windows or macos, or if Wayland and
-    " X11 is not enabled.
-    call assert_equal(0, has('clipboard_plus_avail'))
-    call assert_equal(1, has('clipboard_star_avail'))
-  else
-    let g:vim_test_star = '*'
-    let g:vim_test_plus = '+'
-    clipreset
-
-    call assert_equal(1, has('clipboard_plus_avail'))
-    call assert_equal(1, has('clipboard_star_avail'))
-
-    let g:vim_test_plus = ""
-    clipreset
-
-    call assert_equal(0, has('clipboard_plus_avail'))
-  endif
-
-  set clipmethod&
-endfunc
-
 " vim: shiftwidth=2 sts=2 expandtab
index 9fe790c4e8480844f46dc72b96b4b554422a8ca4..3abc067b3f8fd4db290ddb01839c194cb0357f22 100644 (file)
@@ -529,7 +529,7 @@ func Test_set_completion_string_values()
     if has('unix') || has('vms')
       call assert_match('wayland', getcompletion('set clipmethod=', 'cmdline')[1])
     else
-      call assert_match('gui', getcompletion('set clipmethod=', 'cmdline')[0])
+      call assert_match('wayland', getcompletion('set clipmethod=', 'cmdline')[0])
     endif
   endif
   call assert_equal('.', getcompletion('set complete=', 'cmdline')[1])
index d20067856f8911aabbaff44b74055522d4e2f23d..5a528cc713a009ae6ea10ab6c5b597ebd07f13fa 100644 (file)
@@ -155,11 +155,6 @@ static char *(features[]) =
        "+clipboard",
 #else
        "-clipboard",
-#endif
-#ifdef FEAT_CLIPBOARD_PROVIDER
-       "+clipboard_provider",
-#else
-       "-clipboard_provider",
 #endif
        "+cmdline_compl",
        "+cmdline_hist",
@@ -734,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1873,
 /**/
     1872,
 /**/
index 6c35fe1ef43e0486491ab35d273195c757c93413..83521b9efc9751d3c75cf1e065ccad94b7582559 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -2256,8 +2256,7 @@ typedef int sock_T;
 #define VV_CLIPMETHOD 113
 #define VV_TERMDA1 114
 #define VV_TERMOSC 115
-#define VV_CLIPPROVIDERS 116
-#define VV_LEN         117     // number of v: vars
+#define VV_LEN         116     // number of v: vars
 
 // used for v_number in VAR_BOOL and VAR_SPECIAL
 #define VVAL_FALSE     0L      // VAR_BOOL
@@ -2317,9 +2316,6 @@ typedef enum {
     CLIPMETHOD_NONE,
     CLIPMETHOD_WAYLAND,
     CLIPMETHOD_X11,
-    CLIPMETHOD_GUI,
-    CLIPMETHOD_OTHER,
-    CLIPMETHOD_PROVIDER
 } clipmethod_T;
 
 // Info about selected text