0
0
mirror of https://github.com/vim/vim.git synced 2025-10-26 09:14:23 -04:00

patch 9.1.1656: MS-Windows: Patch v9.1.1652 breaks clipboard

Problem:  MS-Windows: Patch v9.1.1652 breaks clipboard
          (ddad431, after v9.1.1652)
Solution: Revert the patch

Revert "patch 9.1.1652: cannot determine non-X11/Wayland clipmethods"

This reverts commit 3e152c76ad.

fixes: #18064

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-08-20 21:07:07 +02:00
parent 3e44fbf316
commit 17b4c7cfa2
11 changed files with 170 additions and 147 deletions

View 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

View 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])