aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/lua/vim.lua2
-rw-r--r--test/functional/terminal/tui_spec.lua17
2 files changed, 7 insertions, 12 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index 54fce47fd0..e20fc1472e 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -96,7 +96,7 @@ end
-- Default paste function.
local function _paste(data)
-- local eof = (data == {''})
- local curline = vim.api.nvim_call_function('line', {'.'}) - 1
+ local curline = vim.api.nvim_call_function('line', {'.'})
vim.api.nvim_buf_set_lines(
0,
curline,
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index b990652fc0..127cd69975 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -146,8 +146,7 @@ describe('TUI', function()
]], attrs)
end)
- it('bracketed Paste', function()
- -- Pasting can be really slow in the TUI, specially in ASAN.
+ it('paste: Insert mode', function()
feed_data('i\027[200~')
screen:expect([[
{1: } |
@@ -160,8 +159,8 @@ describe('TUI', function()
]])
feed_data('pasted from terminal')
screen:expect([[
- pasted from terminal{1: } |
|
+ pasted from terminal{1: } |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
@@ -171,8 +170,8 @@ describe('TUI', function()
feed_data('\027[201~') -- End paste.
feed_data('\027\000') -- ESC: go to Normal mode.
screen:expect([[
- pasted from termina{1:l} |
|
+ pasted from termina{1:l} |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
@@ -181,24 +180,20 @@ describe('TUI', function()
]])
end)
- it('handles pasting a specific amount of text', function()
- -- Need extra time for this test, specially in ASAN.
- screen.timeout = 60000
+ it('pasting a specific amount of text #10311', function()
feed_data('i\027[200~'..string.rep('z', 64)..'\027[201~')
screen:expect([[
+ |
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz|
zzzzzzzzzzzzzz{1: } |
{4:~ }|
- {4:~ }|
{5:[No Name] [+] }|
{3:-- INSERT --} |
{3:-- TERMINAL --} |
]])
end)
- it('can handle arbitrarily long bursts of input', function()
- -- Need extra time for this test, specially in ASAN.
- screen.timeout = 60000
+ it('big burst of input (bracketed paste)', function()
feed_command('set ruler')
local t = {}
for i = 1, 3000 do