1
0
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:
Bram Moolenaar
2019-05-09 18:59:31 +02:00
parent eae1b91fea
commit d4aa83af1d
10 changed files with 87 additions and 8 deletions

View File

@@ -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