forked from aniani/vim
patch 8.1.1307: cannot reconnect to the X server after it restarted
Problem: Cannot reconnect to the X server after it restarted. Solution: Add the :xrestore command. (Adrian Kocis, closes #844)
This commit is contained in:
@@ -110,3 +110,29 @@ func Test_paste_visual_mode()
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func CheckCopyPaste()
|
||||
call setline(1, ['copy this', ''])
|
||||
normal 1G0"*y$
|
||||
normal j"*p
|
||||
call assert_equal('copy this', getline(2))
|
||||
endfunc
|
||||
|
||||
func Test_xrestore()
|
||||
if !has('xterm_clipboard')
|
||||
return
|
||||
endif
|
||||
call ch_logfile('logfile', 'w')
|
||||
let display = $DISPLAY
|
||||
new
|
||||
call CheckCopyPaste()
|
||||
|
||||
xrestore
|
||||
call CheckCopyPaste()
|
||||
|
||||
exe "xrestore " .. display
|
||||
call CheckCopyPaste()
|
||||
|
||||
call ch_logfile('', '')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user