1
0
forked from aniani/vim

patch 8.1.1840: Testing: WorkingClipboard() is not accurate

Problem:    Testing: WorkingClipboard() is not accurate.
Solution:   Check feature clipboard_working instead.
This commit is contained in:
Bram Moolenaar
2019-08-12 14:20:33 +02:00
parent 0b5dc64446
commit 52992feafe
5 changed files with 7 additions and 20 deletions

View File

@@ -322,13 +322,3 @@ func RunVimPiped(before, after, arguments, pipecmd)
endif
return 1
endfunc
func WorkingClipboard()
if !has('clipboard')
return 0
endif
if has('x11')
return $DISPLAY != ""
endif
return 1
endfunc

View File

@@ -70,9 +70,8 @@ func Test_paste_insert_mode()
endfunc
func Test_paste_clipboard()
if !WorkingClipboard()
return
endif
CheckFeature clipboard_working
let @+ = "nasty\<Esc>:!ls\<CR>command"
new
exe "normal i\<C-R>+\<Esc>"

View File

@@ -1,11 +1,9 @@
" *-register (quotestar) tests
source shared.vim
if !WorkingClipboard()
throw 'Skipped: no working clipboard'
endif
source check.vim
source shared.vim
CheckFeature clipboard_working
func Do_test_quotestar_for_macunix()
if empty(exepath('pbcopy')) || empty(exepath('pbpaste'))

View File

@@ -182,9 +182,7 @@ func Test_xterm_mouse_ctrl_click()
endfunc
func Test_term_mouse_middle_click()
if !WorkingClipboard()
throw 'Skipped: No working clipboard'
endif
CheckFeature clipboard_working
new
let save_mouse = &mouse

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1840,
/**/
1839,
/**/