]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1704: Cannot determine non-X11/Wayland clipmethods v9.1.1704
authorFoxe Chen <chen.foxe@gmail.com>
Wed, 27 Aug 2025 19:24:40 +0000 (21:24 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 27 Aug 2025 19:26:54 +0000 (21:26 +0200)
Problem:  Cannot determine non-X11/Wayland clipmethods
Solution: Add the "gui" value to the 'clipmethod' option (Foxe Chen)

related: #18006
closes: #18067

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/eval.txt
runtime/doc/options.txt
runtime/doc/wayland.txt
src/clipboard.c
src/gui.c
src/optiondefs.h
src/optionstr.c
src/testdir/test_clipmethod.vim
src/testdir/test_options.vim
src/version.c
src/vim.h

index d2344692a23f4db392ec9fd85ec0929bf972267e..edc9bf33aec6e0a879527da87cb451ec09887e25 100644 (file)
@@ -2245,10 +2245,13 @@ 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.
-                       none            The above methods are unavailable or
-                                       cannot be used.
+                       gui             GUI specific method is being used
+                       other           Some other method is being used
+                       none            Clipboard functionality is disabled or
+                                       unavailable.
                See 'clipmethod' for more details.
 
+
                                        *v:cmdarg* *cmdarg-variable*
 v:cmdarg       This variable is used for two purposes:
                1. The extra arguments given to a file read/write command.
index d671a25ea5badbde65568abfb0e3d3b70e17af87..bd4383e175b66f18bc8c55789f342f02156b19c3 100644 (file)
@@ -1906,30 +1906,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",
-                                for VMS: "x11",
-                                otherwise: "")
+'clipmethod' 'cpm'     string  (default for Unix: "wayland,x11,gui,other",
+                                for VMS: "x11,gui,other",
+                                otherwise: "gui,other")
                        global
-                       {only when the |+xterm_clipboard| or
-                       |+wayland_clipboard| features are included}
+                       {only when the |+clipboard| feature is 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
 
-       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.
+       Note: "other" is used on systems without X11/Wayland, such as
+       MS-Windows or MacOS, when running Vim without the GUI.
 
        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.
+       accessing the clipboard.  Setting this option to an empty value
+       disables the clipboard functionality on all systems.
 
-       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 30a5ef5a994fbd7f5dc9aee73d460f0798fdf3db..d4c85c698c6cc05a0f84d33de09bd007b0f03e06 100644 (file)
@@ -1,4 +1,4 @@
-*wayland.txt*   For Vim version 9.1.  Last change: 2025 Aug 20
+*wayland.txt*   For Vim version 9.1.  Last change: 2025 Aug 27
 
 
                  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 "none" when running the GUI.
+should equal to "gui" when running the GUI.
 
 Wayland commands:
                                                        *:wlrestore* *:wl*
@@ -72,7 +72,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 exists.
+to persist selection data when a Wayland client exits.
 
                                                        *wayland-and-x11*
 If your version of Vim comes compiled with both X11 and Wayland support, then
index 5d2dec3afe830c98abe1a6a325a81813a05c35ac..53b180721759e19abe228cc9dd1cd91c5bbfcced 100644 (file)
@@ -142,32 +142,34 @@ clip_update_selection(Clipboard_T *clip)
 }
 
     static int
-clip_gen_own_selection(Clipboard_T *cbd)
+clip_gen_own_selection(Clipboard_T *cbd UNUSED)
 {
-#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_GUI)
+    {
+#ifdef FEAT_GUI
+       if (gui.in_use)
+           return clip_mch_own_selection(cbd);
+#endif
+    }
+    else if (clipmethod == CLIPMETHOD_WAYLAND)
     {
-       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);
+       return clip_xterm_own_selection(cbd);
 #endif
-       }
     }
-    return FAIL;
-#else
-    return clip_mch_own_selection(cbd);
+    else if (clipmethod == CLIPMETHOD_OTHER)
+    {
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+       return clip_mch_own_selection(cbd);
 #endif
+    }
+    return FAIL;
 }
 
     void
@@ -207,31 +209,33 @@ clip_own_selection(Clipboard_T *cbd)
 }
 
     static void
-clip_gen_lose_selection(Clipboard_T *cbd)
+clip_gen_lose_selection(Clipboard_T *cbd UNUSED)
 {
-#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_GUI)
+    {
+#ifdef FEAT_GUI
+       if (gui.in_use)
+           clip_mch_lose_selection(cbd);
+#endif
+    }
+    else if (clipmethod == CLIPMETHOD_WAYLAND)
     {
-       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
-    clip_mch_lose_selection(cbd);
+    else if (clipmethod == CLIPMETHOD_OTHER)
+    {
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+       return clip_mch_lose_selection(cbd);
 #endif
+    }
 }
 
     void
@@ -1257,57 +1261,61 @@ clip_gen_set_selection(Clipboard_T *cbd)
            return;
        }
     }
-#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
-# ifdef FEAT_GUI
-    if (gui.in_use)
+    if (clipmethod == CLIPMETHOD_GUI)
+    {
+#ifdef FEAT_GUI
+       if (gui.in_use)
        clip_mch_set_selection(cbd);
-    else
-# endif
+#endif
+    }
+    else if (clipmethod == CLIPMETHOD_WAYLAND)
     {
-       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);
+       clip_xterm_set_selection(cbd);
 #endif
-       }
     }
-#else
-    clip_mch_set_selection(cbd);
+    else if (clipmethod == CLIPMETHOD_OTHER)
+    {
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+       return clip_mch_set_selection(cbd);
 #endif
+    }
 }
 
     static void
-clip_gen_request_selection(Clipboard_T *cbd)
+clip_gen_request_selection(Clipboard_T *cbd UNUSED)
 {
-#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
+    if (clipmethod == CLIPMETHOD_GUI)
+    {
 # ifdef FEAT_GUI
-    if (gui.in_use)
-       clip_mch_request_selection(cbd);
-    else
+       if (gui.in_use)
+           clip_mch_request_selection(cbd);
 # 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);
+       clip_xterm_request_selection(cbd);
 #endif
-       }
     }
-#else
-    clip_mch_request_selection(cbd);
+    else if (clipmethod == CLIPMETHOD_OTHER)
+    {
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+       return clip_mch_request_selection(cbd);
 #endif
+    }
 }
 
 #if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
@@ -1324,31 +1332,28 @@ clip_x11_owner_exists(Clipboard_T *cbd)
     int
 clip_gen_owner_exists(Clipboard_T *cbd UNUSED)
 {
-#ifdef FEAT_XCLIPBOARD
+    if (clipmethod == CLIPMETHOD_OTHER)
+    {
 # ifdef FEAT_GUI_GTK
-    if (gui.in_use)
-       return clip_gtk_owner_exists(cbd);
-    else
+       if (gui.in_use)
+           return clip_gtk_owner_exists(cbd);
 # endif
+    }
+    else if (clipmethod == CLIPMETHOD_WAYLAND)
     {
-       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;
+# ifdef FEAT_WAYLAND_CLIPBOARD
+       return clip_wl_owner_exists(cbd);
+# endif
     }
-#else
-    return TRUE;
-#endif
+    else if (clipmethod == CLIPMETHOD_X11)
+    {
+# ifdef FEAT_XCLIPBOARD
+       return clip_x11_owner_exists(cbd);
+# endif
+    }
+    else
+       return FALSE;
+    return FALSE;
 }
 #endif
 
@@ -2405,7 +2410,7 @@ poll_data:
        {
            if (ga_grow(&buf, 8192) == FAIL)
                break;
-           start = (char_u *)buf.ga_data + buf.ga_len;
+           start = buf.ga_data + buf.ga_len;
        }
     }
 
@@ -2735,25 +2740,48 @@ get_clipmethod(char_u *str)
 
        if (STRCMP(buf, "wayland") == 0)
        {
+#ifdef FEAT_GUI
+           if (!gui.in_use)
+#endif
+           {
 #ifdef FEAT_WAYLAND_CLIPBOARD
-           if (wayland_cb_is_ready())
-               method = CLIPMETHOD_WAYLAND;
+               if (wayland_cb_is_ready())
+                   method = CLIPMETHOD_WAYLAND;
 #endif
+           }
        }
        else if (STRCMP(buf, "x11") == 0)
        {
-#ifdef FEAT_XCLIPBOARD
-           // 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)
+#ifdef FEAT_GUI
+           if (!gui.in_use)
+#endif
            {
-               // 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;
+#ifdef FEAT_XCLIPBOARD
+               // 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.
+                   xterm_update();
+                   method = CLIPMETHOD_X11;
+               }
+#endif
            }
+       }
+       else if (STRCMP(buf, "gui") == 0)
+       {
+#ifdef FEAT_GUI
+           if (gui.in_use)
+               method = CLIPMETHOD_GUI;
+#endif
+       }
+       else if (STRCMP(buf, "other") == 0)
+       {
+#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
+               method = CLIPMETHOD_OTHER;
 #endif
        }
        else
@@ -2779,17 +2807,21 @@ exit:
 /*
  * Returns name of clipmethod in a statically allocated string.
  */
-    static char *
+    static char_u *
 clipmethod_to_str(clipmethod_T method)
 {
     switch(method)
     {
        case CLIPMETHOD_WAYLAND:
-           return "wayland";
+           return (char_u *)"wayland";
        case CLIPMETHOD_X11:
-           return "x11";
+           return (char_u *)"x11";
+       case CLIPMETHOD_GUI:
+           return (char_u *)"gui";
+       case CLIPMETHOD_OTHER:
+           return (char_u *)"other";
        default:
-           return "none";
+           return (char_u *)"none";
     }
 }
 
@@ -2807,29 +2839,13 @@ choose_clipmethod(void)
     if (method == CLIPMETHOD_FAIL)
        return e_invalid_argument;
 
-// 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
+#if defined(FEAT_GUI) && defined(FEAT_WAYLAND)
+    if (method == CLIPMETHOD_GUI)
        // We only interact with Wayland for the clipboard, we can just deinit
        // everything.
        wayland_uninit_client();
 #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
     if (method == CLIPMETHOD_NONE)
        clip_init(FALSE);
@@ -2844,24 +2860,16 @@ choose_clipmethod(void)
     // Disown clipboard if we are switching to a new method
     if (clipmethod != CLIPMETHOD_NONE && method != clipmethod)
     {
-#if (defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)) \
-       && defined(FEAT_GUI)
-lose_sel_exit:
-#endif
        if (clip_star.owned)
            clip_lose_selection(&clip_star);
        if (clip_plus.owned)
            clip_lose_selection(&clip_plus);
     }
 
-#if !defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD)
-exit:
-#endif
-
     clipmethod = method;
 
 #ifdef FEAT_EVAL
-    set_vim_var_string(VV_CLIPMETHOD, (char_u*)clipmethod_to_str(method), -1);
+    set_vim_var_string(VV_CLIPMETHOD, clipmethod_to_str(method), -1);
 #endif
 
     return NULL;
index 13ce0523b65ce0585f9c20c66a2ecf0f6f3cef6b..5f7452d9d65276c5a4a9740135d5408b13bdce9c 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_NONE
+       // Reset clipmethod to CLIPMETHOD_GUI
        choose_clipmethod();
 
 #ifdef FEAT_SOCKETSERVER
index e667e4f2c3d10aa009e20203ef0b4baadb18930d..2de320b9c72abe91e2ca7c2664df33f3cd94e5f8 100644 (file)
@@ -637,11 +637,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", (char_u *)0L}
+                           {(char_u *)"wayland,x11,gui,other", (char_u *)0L}
 # elif defined(VMS)
-                           {(char_u *)"x11", (char_u *)0L}
+                           {(char_u *)"x11,gui,other", (char_u *)0L}
 # else
-                           {(char_u *)"", (char_u *)0L}
+                           {(char_u *)"gui,other", (char_u *)0L}
 # endif
 #else
                            (char_u *)NULL, PV_NONE, NULL, NULL,
index cbc0a9e4f8677ffadd87a687a4b20b5544710a99..628842ef1a6ddd4e71e1f8fadc7bbed802a3c326 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", NULL};
+static char *(p_cpm_values[]) = {"wayland", "x11", "gui", "other", NULL};
 #endif
 #ifdef FEAT_CRYPT
 static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2",
index 9b34658426b42c2faf3344489b4dfb7a7cbe447e..b1e447923946c0bad59c51ec0771567fd340c9bb 100644 (file)
@@ -1,14 +1,12 @@
 " Tests for clipmethod
 
-source util/window_manager.vim
-
-CheckFeature clipboard_working
-CheckFeature xterm_clipboard
-CheckFeature wayland_clipboard
-CheckUnix
+if has('unix')
+  source util/window_manager.vim
+endif
 
 " 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=
@@ -19,6 +17,9 @@ 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
 
@@ -62,12 +63,12 @@ func Test_clipmethod_order()
   call EndWaylandCompositor(l:wayland_display)
 endfunc
 
-" Test if clipmethod is set to 'none' when gui is started
-func Test_clipmethod_is_none_when_gui()
+" Test if clipmethod is set to 'gui' when gui is started
+func Test_clipmethod_is_gui_when_gui_started()
   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')
@@ -78,12 +79,15 @@ func Test_clipmethod_is_none_when_gui()
 
   call writefile(lines, 'Cbdscript', 'D')
   call system($'{GetVimCommand()} -S Cbdscript')
-  call assert_equal(['1', 'none', 'none'], readfile('Cbdscript'))
+  call assert_equal(['1', 'gui', 'gui'], 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
@@ -173,4 +177,15 @@ 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 f6da0a8a6088abd3cf384b3626a9b9fbc277b463..b17f823e7eb6abd1e38ec6dac2fd65fb52c42d89 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('wayland', getcompletion('set clipmethod=', 'cmdline')[0])
+      call assert_match('gui', getcompletion('set clipmethod=', 'cmdline')[0])
     endif
   endif
   call assert_equal('.', getcompletion('set complete=', 'cmdline')[1])
index e1e0b950fbc995d811d20bb389bacece2071ad75..49f7975e6f9307bcccc7523f4d8ae37ac143d852 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1704,
 /**/
     1703,
 /**/
index 802ac73047d357baedc18b372718f16f27745b5f..db5740deb85fa0c817583347f195175817bcc80d 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -2301,6 +2301,8 @@ typedef enum {
     CLIPMETHOD_NONE,
     CLIPMETHOD_WAYLAND,
     CLIPMETHOD_X11,
+    CLIPMETHOD_GUI,
+    CLIPMETHOD_OTHER,
 } clipmethod_T;
 
 // Info about selected text