diff --git a/src/evalfunc.c b/src/evalfunc.c index 17e7adbcb6..1438f22119 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -7944,7 +7944,11 @@ f_has(typval_T *argvars, typval_T *rettv) { x = TRUE; #ifdef FEAT_CLIPBOARD - n = clip_plus.available && &clip_star != &clip_plus; +# ifdef ONE_CLIPBOARD + n = FALSE; +# else + n = clip_plus.available; +# endif #endif } } diff --git a/src/testdir/test_clipboard_provider.vim b/src/testdir/test_clipboard_provider.vim index 8cc55c3e35..ec9bc52343 100644 --- a/src/testdir/test_clipboard_provider.vim +++ b/src/testdir/test_clipboard_provider.vim @@ -37,6 +37,8 @@ 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": { diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim index 0e5c7e9230..6adfb4d768 100644 --- a/src/testdir/test_eval_stuff.vim +++ b/src/testdir/test_eval_stuff.vim @@ -746,17 +746,19 @@ func Test_clipboard_runtime_features() set clipmethod=evaltest - if has('win32') || has('macunix') + 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 + " 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_plus = '+' let g:vim_test_star = '*' + let g:vim_test_plus = '+' clipreset call assert_equal(1, has('clipboard_plus_avail')) diff --git a/src/version.c b/src/version.c index 9e05de8a31..268d1fc613 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1864, /**/ 1863, /**/