mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
paste: use nvim_put()
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user