0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.0.1587: inserting from the clipboard doesn't work literally

Problem:    inserting from the clipboard doesn't work literally
Solution:   When pasting from the * or + register always assume literally.
This commit is contained in:
Bram Moolenaar
2018-03-06 19:51:13 +01:00
parent 201dc67db5
commit 3324d0a864
4 changed files with 37 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
" Tests for bracketed paste.
" Tests for bracketed paste and other forms of pasting.
" Bracketed paste only works with "xterm". Not in GUI.
if has('gui_running')
@@ -66,6 +66,17 @@ func Test_paste_insert_mode()
bwipe!
endfunc
func Test_paste_clipboard()
if !has('clipboard')
return
endif
let @+ = "nasty\<Esc>:!ls\<CR>command"
new
exe "normal i\<C-R>+\<Esc>"
call assert_equal("nasty\<Esc>:!ls\<CR>command", getline(1))
bwipe!
endfunc
func Test_paste_cmdline()
call feedkeys(":a\<Esc>[200~foo\<CR>bar\<Esc>[201~b\<Home>\"\<CR>", 'xt')
call assert_equal("\"afoo\<CR>barb", getreg(':'))