mirror of
https://github.com/vim/vim.git
synced 2025-10-26 09:14:23 -04:00
patch 9.1.1634: Clipboard code can be improved
Problem: Clipboard code can be improved Solution: Slightly refactor code (Foxe Chen). This commit does the following: - Use garray_T when receiving data instead of manually reallocing - formatting fixes - skip Wayland test that requires clientserver if x11 not compiled - Make some functions static closes: #17999 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ade0815856
commit
126bc4690f
@@ -52,16 +52,15 @@ endfunc
|
||||
|
||||
" Need X connection for tests that use client server communication
|
||||
func s:CheckXConnection()
|
||||
if has('x11')
|
||||
try
|
||||
call remote_send('xxx', '')
|
||||
catch
|
||||
if v:exception =~ 'E240:'
|
||||
throw 'Skipped: no connection to the X server'
|
||||
endif
|
||||
" ignore other errors
|
||||
endtry
|
||||
endif
|
||||
CheckFeature x11
|
||||
try
|
||||
call remote_send('xxx', '')
|
||||
catch
|
||||
if v:exception =~ 'E240:'
|
||||
thrclientserverow 'Skipped: no connection to the X server'
|
||||
endif
|
||||
" ignore other errors
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
func s:EndRemoteVim(name, job)
|
||||
@@ -379,7 +378,7 @@ func Test_wayland_autoselect_works()
|
||||
|
||||
call WaitForAssert({-> assert_equal("run", job_status(l:job))})
|
||||
call WaitForAssert({-> assert_match(name, serverlist())})
|
||||
1
|
||||
|
||||
call remote_send(l:name, "ve")
|
||||
call WaitForAssert({-> assert_equal('LINE', system('wl-paste -p -n'))})
|
||||
|
||||
@@ -648,7 +647,6 @@ func Test_wayland_handle_large_data()
|
||||
call system('cmp --silent data_file data_file_cmp')
|
||||
call assert_equal(0, v:shell_error)
|
||||
|
||||
" copy the text
|
||||
call feedkeys('gg0v$G"+yy', 'x')
|
||||
call system('wl-paste -n -t TEXT > data_file')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user