aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/vim.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-08 18:40:46 -0700
committerGitHub <noreply@github.com>2019-09-08 18:40:46 -0700
commit74c362cec029ba39a8eb0bbd629148e4b6b54968 (patch)
treea8a8af880cb83f0bfb1da9284226868dcf64372f /src/nvim/lua/vim.lua
parentccd947ca4a25edb59e00724d6fb20fb01f3b73f7 (diff)
parenta9e2bae0eb6942829dbedfc9c422060da020d8e4 (diff)
downloadrneovim-74c362cec029ba39a8eb0bbd629148e4b6b54968.tar.gz
rneovim-74c362cec029ba39a8eb0bbd629148e4b6b54968.tar.bz2
rneovim-74c362cec029ba39a8eb0bbd629148e4b6b54968.zip
Merge #10975 'paste: fix various bugs'
Diffstat (limited to 'src/nvim/lua/vim.lua')
-rw-r--r--src/nvim/lua/vim.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index e76dd9d062..010c3b98ee 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -191,10 +191,8 @@ paste = (function()
local line1, _ = string.gsub(lines[1], '[\r\n\012\027]', ' ') -- Scrub.
vim.api.nvim_input(line1)
vim.api.nvim_set_option('paste', false)
- elseif mode == 'i' or mode == 'R' then
+ elseif mode ~= 'c' then
vim.api.nvim_put(lines, 'c', false, true)
- else
- vim.api.nvim_put(lines, 'c', true, true)
end
if phase ~= -1 and (now - tdots >= 100) then
local dots = ('.'):rep(tick % 4)
@@ -205,8 +203,7 @@ paste = (function()
vim.api.nvim_command(('echo "%s"'):format(dots))
end
if phase == -1 or phase == 3 then
- vim.api.nvim_command('redraw')
- vim.api.nvim_command('echo ""')
+ vim.api.nvim_command('redraw'..(tick > 1 and '|echo ""' or ''))
end
return true -- Paste will not continue if not returning `true`.
end