aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/vim.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-24 13:54:27 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-27 22:13:45 +0200
commiteacc70fb3ebae6d76112ab10647a42339f5f223f (patch)
treeef498c6f108edc29498d319de32417d90d8c0bd7 /src/nvim/lua/vim.lua
parentc95f5d166fad75ad8383f76675d06907687066a7 (diff)
downloadrneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.tar.gz
rneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.tar.bz2
rneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.zip
API: nvim_paste
Diffstat (limited to 'src/nvim/lua/vim.lua')
-rw-r--r--src/nvim/lua/vim.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua
index dca61d814a..637a4baf33 100644
--- a/src/nvim/lua/vim.lua
+++ b/src/nvim/lua/vim.lua
@@ -105,9 +105,10 @@ local _paste = (function()
tdots = now
tredraw = now
tick = 0
- if (call('mode', {})):find('[vV]') then
- vim.api.nvim_feedkeys('', 'n', false)
- end
+ -- TODO
+ -- if mode == 'i' or mode == 'R' then
+ -- nvim_cancel()
+ -- end
end
vim.api.nvim_put(lines, 'c', true, true)
if (now - tredraw >= 1000) or phase == 1 or phase == 3 then
@@ -119,6 +120,8 @@ local _paste = (function()
local dots = ('.'):rep(tick % 4)
tdots = now
tick = tick + 1
+ -- Use :echo because Lua print('') is a no-op, and we want to clear the
+ -- message when there are zero dots.
vim.api.nvim_command(('echo "%s"'):format(dots))
end
if phase == 3 then