Mercurial > vim
comparison src/testdir/test_paste.vim @ 16608:0422b14bce58 v8.1.1307
patch 8.1.1307: cannot reconnect to the X server after it restarted
commit https://github.com/vim/vim/commit/d4aa83af1d691fdabbc8e6aab36db2c96ea4d4b6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 9 18:59:31 2019 +0200
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 https://github.com/vim/vim/issues/844)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 May 2019 19:00:08 +0200 |
parents | fa133cd14f87 |
children | f38fcbf343ce |
comparison
equal
deleted
inserted
replaced
16607:5c5a7f945ade | 16608:0422b14bce58 |
---|---|
108 call assert_equal('some letters more', getline(1)) | 108 call assert_equal('some letters more', getline(1)) |
109 call assert_equal("words\nand", getreg('1')) | 109 call assert_equal("words\nand", getreg('1')) |
110 | 110 |
111 bwipe! | 111 bwipe! |
112 endfunc | 112 endfunc |
113 | |
114 func CheckCopyPaste() | |
115 call setline(1, ['copy this', '']) | |
116 normal 1G0"*y$ | |
117 normal j"*p | |
118 call assert_equal('copy this', getline(2)) | |
119 endfunc | |
120 | |
121 func Test_xrestore() | |
122 if !has('xterm_clipboard') | |
123 return | |
124 endif | |
125 call ch_logfile('logfile', 'w') | |
126 let display = $DISPLAY | |
127 new | |
128 call CheckCopyPaste() | |
129 | |
130 xrestore | |
131 call CheckCopyPaste() | |
132 | |
133 exe "xrestore " .. display | |
134 call CheckCopyPaste() | |
135 | |
136 call ch_logfile('', '') | |
137 bwipe! | |
138 endfunc |