Problem: Paste test may fail if $DISPLAY is not set.
Solution: Add WorkingClipboard() and use it in the paste test.
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)
endif
set term=xterm
+source shared.vim
+
func Test_paste_normal_mode()
new
" In first column text is inserted
endfunc
func Test_paste_clipboard()
- if !has('clipboard')
+ if !WorkingClipboard()
return
endif
let @+ = "nasty\<Esc>:!ls\<CR>command"
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1604,
/**/
1603,
/**/