paste: use nvim_put()

This commit is contained in:
Justin M. Keyes
2019-08-20 01:21:27 +02:00
parent e1177be363
commit 5a2894d677
5 changed files with 82 additions and 296 deletions

View File

@@ -110,77 +110,6 @@ describe('mappings', function()
end)
end)
describe('feeding large chunks of input with <Paste>', function()
local screen
before_each(function()
clear()
screen = Screen.new()
screen:attach()
feed_command('set ruler')
end)
it('ok', function()
if helpers.skip_fragile(pending) then
return
end
local t = {}
for i = 1, 20000 do
t[i] = 'item ' .. tostring(i)
end
command('doautocmd PastePre')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
-- INSERT (paste) -- |
]])
feed(table.concat(t, '<Enter>'))
screen:expect([[
item 19988 |
item 19989 |
item 19990 |
item 19991 |
item 19992 |
item 19993 |
item 19994 |
item 19995 |
item 19996 |
item 19997 |
item 19998 |
item 19999 |
item 20000^ |
-- INSERT (paste) -- |
]])
command('doautocmd PastePost')
screen:expect([[
item 19988 |
item 19989 |
item 19990 |
item 19991 |
item 19992 |
item 19993 |
item 19994 |
item 19995 |
item 19996 |
item 19997 |
item 19998 |
item 19999 |
item 2000^0 |
20000,10 Bot |
]])
end)
end)
describe('input utf sequences that contain CSI/K_SPECIAL', function()
before_each(clear)
it('ok', function()