updated for version 7.4.598
Problem: ":tabdo windo echo 'hi'" causes "* register not to be changed.
(Salman Halim)
Solution: Change how clip_did_set_selection is used and add
clipboard_needs_update and global_change_count. (Christian
Brabandt)
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index cd605af..b9f68f7 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -1,7 +1,6 @@
Test for various eval features. vim: set ft=vim :
-Note: system clipboard support is not tested. I do not think anybody will thank
-me for messing with clipboard.
+Note: system clipboard is saved, changed and restored.
STARTTEST
:so small.vim
@@ -122,7 +121,19 @@
call SetReg('/', ["abc/\n"])
call SetReg('=', ['"abc/"'])
call SetReg('=', ["\"abc/\n\""])
-
+$put ='{{{1 System clipboard'
+" Save and restore system clipboard.
+" If no connection to X-Server is possible, test should succeed.
+:let _clipreg = ['+', getreg('+'), getregtype('+')]
+:let _clipopt = &cb
+:let &cb='unnamedplus'
+:1y
+:AR +
+:tabdo :windo :echo "hi"
+:3y
+:AR +
+:let &cb=_clipopt
+:call call('setreg', _clipreg)
$put ='{{{1 Errors'
call ErrExe('call setreg()')
call ErrExe('call setreg(1)')