To: vim_dev@googlegroups.com Subject: Patch 8.0.1604 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1604 Problem: Paste test may fail if $DISPLAY is not set. Solution: Add WorkingClipboard() and use it in the paste test. Files: src/testdir/shared.vim, src/testdir/test_paste.vim *** ../vim-8.0.1603/src/testdir/shared.vim 2018-03-09 21:33:29.248607375 +0100 --- src/testdir/shared.vim 2018-03-13 15:39:33.174114074 +0100 *************** *** 260,265 **** --- 260,275 ---- return has('gui') && ($DISPLAY != "" || has('gui_running')) endfunc + func WorkingClipboard() + if !has('clipboard') + return 0 + endif + if has('x11') + return $DISPLAY != "" + endif + return 1 + endfunc + " Get line "lnum" as displayed on the screen. " Trailing white space is trimmed. func! Screenline(lnum) *** ../vim-8.0.1603/src/testdir/test_paste.vim 2018-03-06 19:51:09.138529945 +0100 --- src/testdir/test_paste.vim 2018-03-13 15:39:16.034217246 +0100 *************** *** 6,11 **** --- 6,13 ---- endif set term=xterm + source shared.vim + func Test_paste_normal_mode() new " In first column text is inserted *************** *** 67,73 **** endfunc func Test_paste_clipboard() ! if !has('clipboard') return endif let @+ = "nasty\:!ls\command" --- 69,75 ---- endfunc func Test_paste_clipboard() ! if !WorkingClipboard() return endif let @+ = "nasty\:!ls\command" *** ../vim-8.0.1603/src/version.c 2018-03-13 13:13:56.715070346 +0100 --- src/version.c 2018-03-13 15:40:33.305752096 +0100 *************** *** 768,769 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1604, /**/ -- hundred-and-one symptoms of being an internet addict: 4. Your eyeglasses have a web site burned in on them. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///